Well, I wondered if this should be part of the catalyst book errerta, but in the end I decided that the code in the book worked, so it wasn't in error.
I have been working through the book using Pg instead of SQLite. The big difference with Pg is that a user/pass are needed. I've navigated a few hurdles on the way, and this afternoon I found another one.
When including a script within your catalyst app, it is The Book has an excellent example which properly integrates your script with the existing config files.
If you construct a DSN in the following way, you can also use the user/pass conbination from your config file!
my @dsn = @{$config->{'Model::AddressDB'}->{connect_info}};
my $HOME = dir($Bin, '..');
$dsn[0] =~ s/__HOME__/$HOME/;
my $schema = AddressBook::Schema::AddressDB->connect(@dsn)
or die "Failed to connect to database at $dsn[0]";
Setting up PostgreSQL 12 Beta 3 for Testing in Amazon RDS
-
One of the amazing things about the PostgreSQL community is launching
releases like clockwork. On 8/8/2019 the PostgreSQL community not only
launched the ...
5 years ago
No comments:
Post a Comment