Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: What is the proper data structure for CAP::DBH?

by tangent (Parson)
on Jan 18, 2023 at 22:26 UTC ( [id://11149676]=note: print w/replies, xml ) Need Help??


in reply to What is the proper data structure for CAP::DBH?

You mention that you are able to create a connection using straight DBI. In the docs for CGI::Application::Plugin::DBH it has:
You can either pass in an existing DBI database handle, or provide the usual parameters used for DBI->connect()
If you haven't tried this already, pass in an existing handle and see if it works - will help narrow the problem.
my $dbh = DBI->connect( ... ); if (not $dbh) { die "Could not connect to DB: ", $DBI::errstr; } $self->dbh_config($dbh);

Replies are listed 'Best First'.
Re^2: What is the proper data structure for CAP::DBH?
by bradcathey (Prior) on Jan 20, 2023 at 00:58 UTC

    I didn't do this exactly, but it prompted me to abstract the code and strip away everything but the salient stuff and I found the error which was simply a bad path to a use lib. Embarrassed but I learned two lessons: abstract the issue, and learn all about sprintf. Thanks all for your help.

    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149676]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-24 06:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found