[Bps-public-commit] r18985 - DBIx-CheckConnectivity/lib/DBIx/CheckConnectivity

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Mar 30 21:25:49 EDT 2009


Author: sunnavy
Date: Mon Mar 30 21:25:49 2009
New Revision: 18985

Modified:
   DBIx-CheckConnectivity/lib/DBIx/CheckConnectivity/Driver.pm

Log:
update: dsn can also have dbname=...

Modified: DBIx-CheckConnectivity/lib/DBIx/CheckConnectivity/Driver.pm
==============================================================================
--- DBIx-CheckConnectivity/lib/DBIx/CheckConnectivity/Driver.pm	(original)
+++ DBIx-CheckConnectivity/lib/DBIx/CheckConnectivity/Driver.pm	Mon Mar 30 21:25:49 2009
@@ -24,7 +24,7 @@
     my $password = $args{password} || '';
 
     my $attribute = $args{attribute} || { RaiseError => 0, PrintError => 0 };
-    my ($database) = $dsn =~ m/dbi:(?:\w+):(?:database=)?(\w+)/;
+    my ($database) = $dsn =~ m/dbi:(?:\w+):(?:(?:database|dbname)=)?(\w+)/;
 
     my $dbh = DBI->connect( $dsn, $user, $password, $attribute );
 



More information about the Bps-public-commit mailing list