[perl-cache commit] r553 - catch errors when drivers are simply not installed

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 17, 2009, 2:33:48 PM3/17/09
to perl-cach...@googlegroups.com
Author: pharkins
Date: Tue Mar 17 11:26:53 2009
New Revision: 553

Modified:
dbi-driver/lib/CHI/t/Driver/DBI.pm

Log:
catch errors when drivers are simply not installed

Modified: dbi-driver/lib/CHI/t/Driver/DBI.pm
==============================================================================
--- dbi-driver/lib/CHI/t/Driver/DBI.pm (original)
+++ dbi-driver/lib/CHI/t/Driver/DBI.pm Tue Mar 17 11:26:53 2009
@@ -22,14 +22,16 @@
sub dbh {
my $self = shift;

- return DBI->connect(
- $self->dsn(),
- '', '',
- {
- RaiseError => 0,
- PrintError => 0,
- }
- );
+ eval {
+ return DBI->connect(
+ $self->dsn(),
+ '', '',
+ {
+ RaiseError => 0,
+ PrintError => 0,
+ }
+ );
+ };
}

sub new_cache_options {

Reply all
Reply to author
Forward
0 new messages