Menu

#13 Gracefully inform if DBI is missing, don't dump

open
nobody
None
5
2012-10-22
2007-04-20
No

System error
error: Can't locate object method "connect" via package "DBI" at /var/apachem/agile/html/common/db_connect.mas line 12.
context:
...
8: my $szDatabase = 'agile';
9:
10: my $dsn = "DBI:mysql:database=$szDatabase;host=$szHost;port=3306";
11:
12: $dbh = DBI->connect($dsn, $szUser, $szPassword) ||
13: die "Cannot connect: $DBI::errstr";
14:
15: return $dbh;
16:
...
code stack: /var/apachem/agile/html/common/db_connect.mas:12
/var/apachem/agile/html/autogen/add_Product_form.html:38
raw error

First test if the module is there.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.