Gracefully inform if DBI is missing, don't dump
Brought to you by:
henriksorensen
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.