in reply to Can't get Dancer2 Auth::Extensible with DBIC working
(2) Is there anyway I can set up my config so I don't have to repeat the DBIC login data.
If the objective is, as I assume, to avoid having the password there (twice): PostgreSQL offers the possibility to set up postgres services, with connection-details in a so-called service-file, leading to e.g. dbi:Pg:service=dev
It is also possible to setup DBI to connect using just 'dbi:Pg:', with postgres' libpq library picking up connection-info from the environment ( see PGSERVICE in the fine manual; and also: PG environmental variables ).
(And there is even the DBI_DSN env var to put the 'dbi:Pg:'-part in the environment:
)DBI_DSN=dbi:Pg: perl -MDBI -E 'print DBI->connect, "\n"' DBI::db=HASH(0x181f760)
|
---|
In Section
Seekers of Perl Wisdom