X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXSql.pm;h=d0f7856b05193c58251e61cb5bd7fa0084832ba4;hb=ccf7c87f955ebc8534681247b70371c00b14609f;hp=a2194a7b2f7618a06f0ba10a1b1064f69f22e0d5;hpb=9335fc83d6c885d49ac336e7058a5d5657da97cd;p=spider.git diff --git a/perl/DXSql.pm b/perl/DXSql.pm index a2194a7b..d0f7856b 100644 --- a/perl/DXSql.pm +++ b/perl/DXSql.pm @@ -22,6 +22,8 @@ our $active = 0; sub init { + my $dsn = shift; + return unless $dsn; return $active if $active; eval { @@ -31,6 +33,7 @@ sub init import DBI; $active++; } + undef $@; return $active; }