diff --git a/lib/DBD/SQLite.pm b/lib/DBD/SQLite.pm index 3752eeb..56f8395 100644 --- a/lib/DBD/SQLite.pm +++ b/lib/DBD/SQLite.pm @@ -5,24 +5,14 @@ use strict; use DBI 1.57 (); use DynaLoader (); -use vars qw($VERSION @ISA); -use vars qw{$err $errstr $drh $sqlite_version $sqlite_version_number}; -use vars qw{%COLLATION}; +our $VERSION = '1.37'; +our @ISA = 'DynaLoader'; -BEGIN { - $VERSION = '1.37'; - @ISA = 'DynaLoader'; +# sqlite_version cache (set in the XS bootstrap) +our ($sqlite_version, $sqlite_version_number); - # Initialize errors - $err = undef; - $errstr = undef; - - # Driver singleton - $drh = undef; - - # sqlite_version cache - $sqlite_version = undef; -} +# not sure if we still need these... +our ($err, $errstr); __PACKAGE__->bootstrap($VERSION); @@ -30,10 +20,12 @@ __PACKAGE__->bootstrap($VERSION); use constant NEWAPI => ($DBI::VERSION >= 1.608); # global registry of collation functions, initialized with 2 builtins +our %COLLATION; tie %COLLATION, 'DBD::SQLite::_WriteOnceHash'; $COLLATION{perl} = sub { $_[0] cmp $_[1] }; $COLLATION{perllocale} = sub { use locale; $_[0] cmp $_[1] }; +our $drh; my $methods_are_installed = 0; sub driver { diff --git a/t/lib/Test.pm b/t/lib/Test.pm index 30a7982..3a4ec7e 100644 --- a/t/lib/Test.pm +++ b/t/lib/Test.pm @@ -7,14 +7,15 @@ use Exporter (); use File::Spec (); 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 %dbfiles; -BEGIN { - $VERSION = '1.37'; - @ISA = 'Exporter'; - @EXPORT = qw/connect_ok dies dbfile @CALL_FUNCS/; +BEGIN { # Allow tests to load modules bundled in /inc unshift @INC, 'inc';