projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix 5.8 ism that does not work on 5.6 (incrementing a subroutine).
[spider.git]
/
perl
/
DXSql.pm
diff --git
a/perl/DXSql.pm
b/perl/DXSql.pm
index fcf4e4ce5608dd5fc4068f4adb2c19924278483f..8e2085de009687e9c61e7bcdb8a85566d2fac904 100644
(file)
--- a/
perl/DXSql.pm
+++ b/
perl/DXSql.pm
@@
-10,6
+10,8
@@
package DXSql;
use strict;
use strict;
+use DXSql::SQLite;
+use DXSql::mysql;
use DXDebug;
use vars qw($VERSION $BRANCH);
use DXDebug;
use vars qw($VERSION $BRANCH);
@@
-22,6
+24,8
@@
our $active = 0;
sub init
{
sub init
{
+ my $dsn = shift;
+ return unless $dsn;
return $active if $active;
eval {
return $active if $active;
eval {
@@
-31,6
+35,7
@@
sub init
import DBI;
$active++;
}
import DBI;
$active++;
}
+ undef $@;
return $active;
}
return $active;
}
@@
-170,7
+175,7
@@
sub spot_search
$expr =~ s/\$f9/spotcq/g;
$expr =~ s/\|\|/ or /g;
$expr =~ s/\&\&/ and /g;
$expr =~ s/\$f9/spotcq/g;
$expr =~ s/\|\|/ or /g;
$expr =~ s/\&\&/ and /g;
- $expr =~ s/=~\s+m\{\^([
\w]+)[^\}]*\}/ like '$1%
'/g;
+ $expr =~ s/=~\s+m\{\^([
%\w]+)[^\}]*\}/ like '$1
'/g;
} else {
$expr = '';
}
} else {
$expr = '';
}