mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
use our, because we don't support perl < 5.006
This commit is contained in:
parent
b61c059d82
commit
65b47d0444
2 changed files with 14 additions and 21 deletions
|
@ -5,24 +5,14 @@ use strict;
|
||||||
use DBI 1.57 ();
|
use DBI 1.57 ();
|
||||||
use DynaLoader ();
|
use DynaLoader ();
|
||||||
|
|
||||||
use vars qw($VERSION @ISA);
|
our $VERSION = '1.37';
|
||||||
use vars qw{$err $errstr $drh $sqlite_version $sqlite_version_number};
|
our @ISA = 'DynaLoader';
|
||||||
use vars qw{%COLLATION};
|
|
||||||
|
|
||||||
BEGIN {
|
# sqlite_version cache (set in the XS bootstrap)
|
||||||
$VERSION = '1.37';
|
our ($sqlite_version, $sqlite_version_number);
|
||||||
@ISA = 'DynaLoader';
|
|
||||||
|
|
||||||
# Initialize errors
|
# not sure if we still need these...
|
||||||
$err = undef;
|
our ($err, $errstr);
|
||||||
$errstr = undef;
|
|
||||||
|
|
||||||
# Driver singleton
|
|
||||||
$drh = undef;
|
|
||||||
|
|
||||||
# sqlite_version cache
|
|
||||||
$sqlite_version = undef;
|
|
||||||
}
|
|
||||||
|
|
||||||
__PACKAGE__->bootstrap($VERSION);
|
__PACKAGE__->bootstrap($VERSION);
|
||||||
|
|
||||||
|
@ -30,10 +20,12 @@ __PACKAGE__->bootstrap($VERSION);
|
||||||
use constant NEWAPI => ($DBI::VERSION >= 1.608);
|
use constant NEWAPI => ($DBI::VERSION >= 1.608);
|
||||||
|
|
||||||
# global registry of collation functions, initialized with 2 builtins
|
# global registry of collation functions, initialized with 2 builtins
|
||||||
|
our %COLLATION;
|
||||||
tie %COLLATION, 'DBD::SQLite::_WriteOnceHash';
|
tie %COLLATION, 'DBD::SQLite::_WriteOnceHash';
|
||||||
$COLLATION{perl} = sub { $_[0] cmp $_[1] };
|
$COLLATION{perl} = sub { $_[0] cmp $_[1] };
|
||||||
$COLLATION{perllocale} = sub { use locale; $_[0] cmp $_[1] };
|
$COLLATION{perllocale} = sub { use locale; $_[0] cmp $_[1] };
|
||||||
|
|
||||||
|
our $drh;
|
||||||
my $methods_are_installed = 0;
|
my $methods_are_installed = 0;
|
||||||
|
|
||||||
sub driver {
|
sub driver {
|
||||||
|
|
|
@ -7,14 +7,15 @@ use Exporter ();
|
||||||
use File::Spec ();
|
use File::Spec ();
|
||||||
use Test::More ();
|
use Test::More ();
|
||||||
|
|
||||||
use vars qw{$VERSION @ISA @EXPORT @CALL_FUNCS};
|
our $VERSION = '1.37';
|
||||||
|
our @ISA = 'Exporter';
|
||||||
|
our @EXPORT = qw/connect_ok dies dbfile @CALL_FUNCS/;
|
||||||
|
our @CALL_FUNCS;
|
||||||
|
|
||||||
my $parent;
|
my $parent;
|
||||||
my %dbfiles;
|
my %dbfiles;
|
||||||
BEGIN {
|
|
||||||
$VERSION = '1.37';
|
|
||||||
@ISA = 'Exporter';
|
|
||||||
@EXPORT = qw/connect_ok dies dbfile @CALL_FUNCS/;
|
|
||||||
|
|
||||||
|
BEGIN {
|
||||||
# Allow tests to load modules bundled in /inc
|
# Allow tests to load modules bundled in /inc
|
||||||
unshift @INC, 'inc';
|
unshift @INC, 'inc';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue