From: Gurusamy Sarathy Date: Sun, 23 Jan 2000 12:23:48 +0000 (+0000) Subject: s/use vars/our/g modules that aren't independently maintained on CPAN X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=17f410f9a3a4ae9cda502b59b391e6653db436ce;p=p5sagit%2Fp5-mst-13.2.git s/use vars/our/g modules that aren't independently maintained on CPAN p4raw-id: //depot/perl@4860 --- diff --git a/ext/B/B/Asmdata.pm b/ext/B/B/Asmdata.pm index a7dbbe2..d62967f 100644 --- a/ext/B/B/Asmdata.pm +++ b/ext/B/B/Asmdata.pm @@ -12,7 +12,7 @@ package B::Asmdata; use Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name); -use vars qw(%insn_data @insn_name @optype @specialsv_name); +our(%insn_data, @insn_name, @optype, @specialsv_name); @optype = qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP); @specialsv_name = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no); diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm index e134a21..00f623d 100644 --- a/ext/Data/Dumper/Dumper.pm +++ b/ext/Data/Dumper/Dumper.pm @@ -13,7 +13,7 @@ $VERSION = '2.101'; #$| = 1; -require 5.004_02; +require 5.005_64; require Exporter; use XSLoader (); require overload; diff --git a/ext/Devel/DProf/DProf.pm b/ext/Devel/DProf/DProf.pm index 7af4771..38082fc 100644 --- a/ext/Devel/DProf/DProf.pm +++ b/ext/Devel/DProf/DProf.pm @@ -1,4 +1,4 @@ -require 5.003; +require 5.005_64; =head1 NAME diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index 1eb14e9..43bec99 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -42,7 +42,7 @@ what constants are implemented in your system. =cut -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $AUTOLOAD); require Exporter; use XSLoader (); diff --git a/ext/File/Glob/Glob.pm b/ext/File/Glob/Glob.pm index 6b5ff84..ea56b44 100644 --- a/ext/File/Glob/Glob.pm +++ b/ext/File/Glob/Glob.pm @@ -2,8 +2,8 @@ package File::Glob; use strict; use Carp; -use vars qw($VERSION @ISA @EXPORT_OK @EXPORT_FAIL - %EXPORT_TAGS $AUTOLOAD $DEFAULT_FLAGS); +our($VERSION, @ISA, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, + $AUTOLOAD, $DEFAULT_FLAGS); require Exporter; use XSLoader (); diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm index 663a679..ab866ee 100644 --- a/ext/GDBM_File/GDBM_File.pm +++ b/ext/GDBM_File/GDBM_File.pm @@ -40,7 +40,7 @@ L, L, L. package GDBM_File; use strict; -use vars qw($VERSION @ISA @EXPORT $AUTOLOAD); +our($VERSION, @ISA, @EXPORT, $AUTOLOAD); require Carp; require Tie::Hash; diff --git a/ext/IO/lib/IO/Dir.pm b/ext/IO/lib/IO/Dir.pm index f505e79..1fa07ed 100644 --- a/ext/IO/lib/IO/Dir.pm +++ b/ext/IO/lib/IO/Dir.pm @@ -13,7 +13,7 @@ use Carp; use Symbol; use Exporter; use IO::File; -use vars qw(@ISA $VERSION @EXPORT_OK); +our(@ISA, $VERSION, @EXPORT_OK); use Tie::Hash; use File::stat; diff --git a/ext/IO/lib/IO/File.pm b/ext/IO/lib/IO/File.pm index 47f43d1..819b4b1 100644 --- a/ext/IO/lib/IO/File.pm +++ b/ext/IO/lib/IO/File.pm @@ -103,9 +103,9 @@ Derived from FileHandle.pm by Graham Barr EFE. =cut -require 5.000; +require 5.005_64; use strict; -use vars qw($VERSION @EXPORT @EXPORT_OK @ISA); +our($VERSION, @EXPORT, @EXPORT_OK, @ISA); use Carp; use Symbol; use SelectSaver; diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm index 2205368..930df55 100644 --- a/ext/IO/lib/IO/Handle.pm +++ b/ext/IO/lib/IO/Handle.pm @@ -232,9 +232,9 @@ Derived from FileHandle.pm by Graham Barr EFE =cut -require 5.000; +require 5.005_64; use strict; -use vars qw($VERSION @EXPORT_OK @ISA); +our($VERSION, @EXPORT_OK, @ISA); use Carp; use Symbol; use SelectSaver; diff --git a/ext/IO/lib/IO/Pipe.pm b/ext/IO/lib/IO/Pipe.pm index daf6fe6..27b5ad0 100644 --- a/ext/IO/lib/IO/Pipe.pm +++ b/ext/IO/lib/IO/Pipe.pm @@ -6,11 +6,11 @@ package IO::Pipe; -require 5.000; +require 5.005_64; use IO::Handle; use strict; -use vars qw($VERSION); +our($VERSION); use Carp; use Symbol; @@ -135,7 +135,7 @@ sub writer { package IO::Pipe::End; -use vars qw(@ISA); +our(@ISA); @ISA = qw(IO::Handle); diff --git a/ext/IO/lib/IO/Poll.pm b/ext/IO/lib/IO/Poll.pm index a984985..687664b 100644 --- a/ext/IO/lib/IO/Poll.pm +++ b/ext/IO/lib/IO/Poll.pm @@ -9,7 +9,7 @@ package IO::Poll; use strict; use IO::Handle; use Exporter (); -use vars qw(@ISA @EXPORT_OK @EXPORT $VERSION); +our(@ISA, @EXPORT_OK, @EXPORT, $VERSION); @ISA = qw(Exporter); $VERSION = "0.01"; diff --git a/ext/IO/lib/IO/Seekable.pm b/ext/IO/lib/IO/Seekable.pm index 6c07e94..bfcfc13 100644 --- a/ext/IO/lib/IO/Seekable.pm +++ b/ext/IO/lib/IO/Seekable.pm @@ -44,10 +44,10 @@ Derived from FileHandle.pm by Graham Barr Egbarr@pobox.comE =cut -require 5.000; +require 5.005_64; use Carp; use strict; -use vars qw($VERSION @EXPORT @ISA); +our($VERSION, @EXPORT, @ISA); use IO::Handle qw(SEEK_SET SEEK_CUR SEEK_END); require Exporter; diff --git a/ext/IO/lib/IO/Socket.pm b/ext/IO/lib/IO/Socket.pm index b843999..0e81c4b 100644 --- a/ext/IO/lib/IO/Socket.pm +++ b/ext/IO/lib/IO/Socket.pm @@ -6,13 +6,13 @@ package IO::Socket; -require 5.000; +require 5.005_64; use IO::Handle; use Socket 1.3; use Carp; use strict; -use vars qw(@ISA $VERSION); +our(@ISA, $VERSION); use Exporter; # legacy diff --git a/ext/IO/lib/IO/Socket/INET.pm b/ext/IO/lib/IO/Socket/INET.pm index c8e3a76..7818508 100644 --- a/ext/IO/lib/IO/Socket/INET.pm +++ b/ext/IO/lib/IO/Socket/INET.pm @@ -7,7 +7,7 @@ package IO::Socket::INET; use strict; -use vars qw(@ISA $VERSION); +our(@ISA, $VERSION); use IO::Socket; use Socket; use Carp; diff --git a/ext/IO/lib/IO/Socket/UNIX.pm b/ext/IO/lib/IO/Socket/UNIX.pm index 8f3b31f..d083f48 100644 --- a/ext/IO/lib/IO/Socket/UNIX.pm +++ b/ext/IO/lib/IO/Socket/UNIX.pm @@ -7,7 +7,7 @@ package IO::Socket::UNIX; use strict; -use vars qw(@ISA $VERSION); +our(@ISA, $VERSION); use IO::Socket; use Socket; use Carp; diff --git a/ext/NDBM_File/NDBM_File.pm b/ext/NDBM_File/NDBM_File.pm index 578148c..d8be520 100644 --- a/ext/NDBM_File/NDBM_File.pm +++ b/ext/NDBM_File/NDBM_File.pm @@ -5,14 +5,12 @@ BEGIN { use strict; } } -use vars qw($VERSION @ISA); require Tie::Hash; use DynaLoader (); -@ISA = qw(Tie::Hash); - -$VERSION = "1.03"; +our @ISA = qw(Tie::Hash); +our $VERSION = "1.03"; XSLoader::load 'NDBM_File', $VERSION; diff --git a/ext/ODBM_File/ODBM_File.pm b/ext/ODBM_File/ODBM_File.pm index 6199443..286b02c 100644 --- a/ext/ODBM_File/ODBM_File.pm +++ b/ext/ODBM_File/ODBM_File.pm @@ -1,14 +1,12 @@ package ODBM_File; use strict; -use vars qw($VERSION @ISA); require Tie::Hash; use DynaLoader (); -@ISA = qw(Tie::Hash); - -$VERSION = "1.02"; +our @ISA = qw(Tie::Hash); +our $VERSION = "1.02"; XSLoader::load 'ODBM_File', $VERSION; diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index 3915b40..9338d39 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -1,8 +1,8 @@ package Opcode; -require 5.002; +require 5.005_64; -use vars qw($VERSION $XS_VERSION @ISA @EXPORT_OK); +our($VERSION, $XS_VERSION, @ISA, @EXPORT_OK); $VERSION = "1.04"; $XS_VERSION = "1.03"; diff --git a/ext/Opcode/Safe.pm b/ext/Opcode/Safe.pm index 00ee85d..7e1d6a3 100644 --- a/ext/Opcode/Safe.pm +++ b/ext/Opcode/Safe.pm @@ -2,9 +2,8 @@ package Safe; use 5.003_11; use strict; -use vars qw($VERSION); -$VERSION = "2.06"; +our $VERSION = "2.06"; use Carp; diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index a38c74d..59c753c 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -1,7 +1,6 @@ package POSIX; -# use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT_OK $AUTOLOAD); -(@ISA, %EXPORT_TAGS,@EXPORT_OK,$AUTOLOAD) = (); +our(@ISA, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD) = (); use Carp; use AutoLoader; @@ -12,7 +11,7 @@ require Exporter; use XSLoader (); @ISA = qw(Exporter); -$VERSION = "1.03" ; +our $VERSION = "1.03" ; %EXPORT_TAGS = ( diff --git a/ext/SDBM_File/SDBM_File.pm b/ext/SDBM_File/SDBM_File.pm index 1f3b400..c5e26c8 100644 --- a/ext/SDBM_File/SDBM_File.pm +++ b/ext/SDBM_File/SDBM_File.pm @@ -1,14 +1,12 @@ package SDBM_File; use strict; -use vars qw($VERSION @ISA); require Tie::Hash; use XSLoader (); -@ISA = qw(Tie::Hash); - -$VERSION = "1.02" ; +our @ISA = qw(Tie::Hash); +our $VERSION = "1.02" ; XSLoader::load 'SDBM_File', $VERSION; diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 1fa108f..cec13ac 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -1,6 +1,6 @@ package Socket; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); $VERSION = "1.71"; =head1 NAME diff --git a/ext/Thread/Thread.pm b/ext/Thread/Thread.pm index f15883e..32e4c82 100644 --- a/ext/Thread/Thread.pm +++ b/ext/Thread/Thread.pm @@ -1,7 +1,7 @@ package Thread; require Exporter; use XSLoader (); -use vars qw($VERSION @ISA @EXPORT); +our($VERSION, @ISA, @EXPORT); $VERSION = "1.0"; diff --git a/lib/AnyDBM_File.pm b/lib/AnyDBM_File.pm index 9cf9b31..58ffda7 100644 --- a/lib/AnyDBM_File.pm +++ b/lib/AnyDBM_File.pm @@ -1,7 +1,7 @@ package AnyDBM_File; -use vars qw(@ISA); -@ISA = qw(NDBM_File DB_File GDBM_File SDBM_File ODBM_File) unless @ISA; +use 5.005_64; +our @ISA = qw(NDBM_File DB_File GDBM_File SDBM_File ODBM_File) unless @ISA; my $mod; for $mod (@ISA) { diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm index 4bbcb33..d62ceb0 100644 --- a/lib/AutoLoader.pm +++ b/lib/AutoLoader.pm @@ -1,6 +1,7 @@ package AutoLoader; -# use vars qw(@EXPORT @EXPORT_OK $VERSION); +use 5.005_64; +our(@EXPORT, @EXPORT_OK, $VERSION); my $is_dosish; my $is_vms; diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm index feecd58..3cb01a1 100644 --- a/lib/AutoSplit.pm +++ b/lib/AutoSplit.pm @@ -1,15 +1,14 @@ package AutoSplit; +use 5.005_64; use Exporter (); use Config qw(%Config); use Carp qw(carp); use File::Basename (); use File::Path qw(mkpath); use strict; -use vars qw( - $VERSION @ISA @EXPORT @EXPORT_OK - $Verbose $Keep $Maxlen $CheckForAutoloader $CheckModTime - ); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Verbose, $Keep, $Maxlen, + $CheckForAutoloader, $CheckModTime); $VERSION = "1.0304"; @ISA = qw(Exporter); diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm index 3e08e80..554865a 100644 --- a/lib/Class/Struct.pm +++ b/lib/Class/Struct.pm @@ -2,10 +2,10 @@ package Class::Struct; ## See POD after __END__ -require 5.002; +use 5.005_64; use strict; -use vars qw(@ISA @EXPORT $VERSION); +our(@ISA, @EXPORT, $VERSION); use Carp; diff --git a/lib/Dumpvalue.pm b/lib/Dumpvalue.pm index 18a40ee..33f6793 100644 --- a/lib/Dumpvalue.pm +++ b/lib/Dumpvalue.pm @@ -1,7 +1,7 @@ -require 5.005; # For (defined ref) and $#$v +use 5.005_64; # for (defined ref) and $#$v and our package Dumpvalue; use strict; -use vars qw(%address *stab %subs); +our(%address, $stab, @stab, %stab, %subs); # translate control chars to ^X - Randal Schwartz # Modifications to print types by Peter Gordon v1.0 diff --git a/lib/ExtUtils/Command.pm b/lib/ExtUtils/Command.pm index e900e51..bccc76c 100644 --- a/lib/ExtUtils/Command.pm +++ b/lib/ExtUtils/Command.pm @@ -1,4 +1,6 @@ package ExtUtils::Command; + +use 5.005_64; use strict; # use AutoLoader; use Carp; @@ -7,7 +9,7 @@ use File::Compare; use File::Basename; use File::Path qw(rmtree); require Exporter; -use vars qw(@ISA @EXPORT $VERSION); +our(@ISA, @EXPORT, $VERSION); @ISA = qw(Exporter); @EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f); $VERSION = '1.01'; diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index d6b1375..3c183a3 100644 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -1,12 +1,13 @@ package ExtUtils::Install; +use 5.005_64; +our(@ISA, @EXPORT, $VERSION); $VERSION = substr q$Revision: 1.28 $, 10; # $Date: 1998/01/25 07:08:24 $ use Exporter; use Carp (); use Config qw(%Config); -use vars qw(@ISA @EXPORT $VERSION); @ISA = ('Exporter'); @EXPORT = ('install','uninstall','pm_to_blib', 'install_default'); $Is_VMS = $^O eq 'VMS'; @@ -15,7 +16,7 @@ my $splitchar = $^O eq 'VMS' ? '|' : ($^O eq 'os2' || $^O eq 'dos') ? ';' : ':'; my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || ''; my $Inc_uninstall_warn_handler; -#use vars qw( @EXPORT @ISA $Is_VMS ); +#our(@EXPORT, @ISA, $Is_VMS); #use strict; sub forceunlink { diff --git a/lib/ExtUtils/Installed.pm b/lib/ExtUtils/Installed.pm index 41f3c9b..da4a653 100644 --- a/lib/ExtUtils/Installed.pm +++ b/lib/ExtUtils/Installed.pm @@ -1,4 +1,6 @@ package ExtUtils::Installed; + +use 5.005_64; use strict; use Carp qw(); use ExtUtils::Packlist; @@ -6,8 +8,7 @@ use ExtUtils::MakeMaker; use Config; use File::Find; use File::Basename; -use vars qw($VERSION); -$VERSION = '0.02'; +our $VERSION = '0.02'; sub _is_type($$$) { diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index b992ec0..c858236 100644 --- a/lib/ExtUtils/Liblist.pm +++ b/lib/ExtUtils/Liblist.pm @@ -1,8 +1,9 @@ package ExtUtils::Liblist; -use vars qw($VERSION); + +use 5.005_64; # Broken out of MakeMaker from version 4.11 -$VERSION = substr q$Revision: 1.25 $, 10; +our $VERSION = substr q$Revision: 1.25 $, 10; use Config; use Cwd 'cwd'; diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index f3de323..5eccf78 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -13,7 +13,7 @@ require Exporter; use VMS::Filespec; use File::Basename; use File::Spec; -use vars qw($Revision @ISA); +our($Revision, @ISA); $Revision = '5.56 (27-Apr-1999)'; @ISA = qw( File::Spec ); diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index 9dcedbf..a0126cc 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -1,10 +1,12 @@ package ExtUtils::Mksymlists; + +use 5.005_64; use strict qw[ subs refs ]; # no strict 'vars'; # until filehandles are exempted use Carp; use Exporter; -use vars qw( @ISA @EXPORT $VERSION ); +our(@ISA, @EXPORT, $VERSION); @ISA = 'Exporter'; @EXPORT = '&Mksymlists'; $VERSION = substr q$Revision: 1.17 $, 10; diff --git a/lib/ExtUtils/Packlist.pm b/lib/ExtUtils/Packlist.pm index eeb0a5b..88ea206 100644 --- a/lib/ExtUtils/Packlist.pm +++ b/lib/ExtUtils/Packlist.pm @@ -1,8 +1,9 @@ package ExtUtils::Packlist; + +use 5.005_64; use strict; use Carp qw(); -use vars qw($VERSION); -$VERSION = '0.03'; +our $VERSION = '0.03'; # Used for generating filehandle globs. IO::File might not be available! my $fhname = "FH1"; diff --git a/lib/Fatal.pm b/lib/Fatal.pm index d1d95af..12fef27 100644 --- a/lib/Fatal.pm +++ b/lib/Fatal.pm @@ -1,8 +1,9 @@ package Fatal; +use 5.005_64; use Carp; use strict; -use vars qw( $AUTOLOAD $Debug $VERSION); +our($AUTOLOAD, $Debug, $VERSION); $VERSION = 1.02; diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index d1c8666..da2caee 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -135,11 +135,11 @@ BEGIN { - +use 5.005_64; +our(@ISA, @EXPORT, $VERSION, $Fileparse_fstype, $Fileparse_igncase); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(fileparse fileparse_set_fstype basename dirname); -use vars qw($VERSION $Fileparse_fstype $Fileparse_igncase); $VERSION = "2.6"; diff --git a/lib/File/Compare.pm b/lib/File/Compare.pm index dce78e2..8a8afac 100644 --- a/lib/File/Compare.pm +++ b/lib/File/Compare.pm @@ -1,7 +1,8 @@ package File::Compare; +use 5.005_64; use strict; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $Too_Big *FROM *TO); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Too_Big); require Exporter; use Carp; @@ -115,6 +116,7 @@ sub compare { return -1; } +sub cmp; *cmp = \&compare; sub compare_text { diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index 8df54e5..8638bee 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -7,10 +7,14 @@ package File::Copy; +use 5.005_64; use strict; use Carp; -use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION $Too_Big - © &syscopy &cp &mv $Syscopy_is_copy); +our(@ISA, @EXPORT, @EXPORT_OK, $VERSION, $Too_Big, $Syscopy_is_copy); +sub copy; +sub syscopy; +sub cp; +sub mv; # Note that this module implements only *part* of the API defined by # the File/Copy.pm module of the File-Tools-2.0 package. However, that diff --git a/lib/File/Find.pm b/lib/File/Find.pm index c674b2c..0485bce 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -1,5 +1,5 @@ package File::Find; -require 5.005; +use 5.005_64; require Exporter; require Cwd; @@ -270,7 +270,7 @@ sub Follow_SymLink($) { return $AbsName; } -use vars qw/ $dir $name $fullname $prune /; +our($dir, $name, $fullname, $prune); sub _find_dir_symlnk($$$); sub _find_dir($$$); diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 634b2cd..bac48a1 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -91,13 +91,14 @@ Charles Bailey > =cut +use 5.005_64; use Carp; use File::Basename (); use DirHandle (); use Exporter (); use strict; -use vars qw( $VERSION @ISA @EXPORT ); +our($VERSION, @ISA, @EXPORT); $VERSION = "1.0402"; @ISA = qw( Exporter ); @EXPORT = qw( mkpath rmtree ); diff --git a/lib/File/stat.pm b/lib/File/stat.pm index f5d17f7..f86bfe5 100644 --- a/lib/File/stat.pm +++ b/lib/File/stat.pm @@ -1,9 +1,11 @@ package File::stat; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); + BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(stat lstat); @EXPORT_OK = qw( $st_dev $st_ino $st_mode $st_nlink $st_uid $st_gid @@ -13,7 +15,6 @@ BEGIN { ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); } -use vars @EXPORT_OK; # Class::Struct forbids use of @ISA sub import { goto &Exporter::import } diff --git a/lib/FileHandle.pm b/lib/FileHandle.pm index eec9b61..34c3475 100644 --- a/lib/FileHandle.pm +++ b/lib/FileHandle.pm @@ -1,8 +1,8 @@ package FileHandle; -use 5.003_11; +use 5.005_64; use strict; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK); $VERSION = "2.00"; diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm index b339573..7f6e3bf 100644 --- a/lib/Math/Complex.pm +++ b/lib/Math/Complex.pm @@ -8,9 +8,10 @@ require Exporter; package Math::Complex; +use 5.005_64; use strict; -use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS); +our($VERSION, @ISA, @EXPORT, %EXPORT_TAGS); my ( $i, $ip2, %logn ); diff --git a/lib/Math/Trig.pm b/lib/Math/Trig.pm index c659137..3a592b4 100644 --- a/lib/Math/Trig.pm +++ b/lib/Math/Trig.pm @@ -7,13 +7,12 @@ require Exporter; package Math::Trig; +use 5.005_64; use strict; use Math::Complex qw(:trig); -use vars qw($VERSION $PACKAGE - @ISA - @EXPORT @EXPORT_OK %EXPORT_TAGS); +our($VERSION, $PACKAGE, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw(Exporter); diff --git a/lib/Net/Ping.pm b/lib/Net/Ping.pm index 5454060..0c8622e 100644 --- a/lib/Net/Ping.pm +++ b/lib/Net/Ping.pm @@ -10,12 +10,11 @@ package Net::Ping; # program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. -require 5.002; +use 5.005_64; require Exporter; use strict; -use vars qw(@ISA @EXPORT $VERSION - $def_timeout $def_proto $max_datasize); +our(@ISA, @EXPORT, $VERSION, $def_timeout, $def_proto, $max_datasize); use FileHandle; use Socket qw( SOCK_DGRAM SOCK_STREAM SOCK_RAW PF_INET inet_aton sockaddr_in ); diff --git a/lib/Net/hostent.pm b/lib/Net/hostent.pm index d586358..6cfde72 100644 --- a/lib/Net/hostent.pm +++ b/lib/Net/hostent.pm @@ -1,9 +1,10 @@ package Net::hostent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(gethostbyname gethostbyaddr gethost); @EXPORT_OK = qw( $h_name @h_aliases diff --git a/lib/Net/netent.pm b/lib/Net/netent.pm index fbc6d98..d8c094a 100644 --- a/lib/Net/netent.pm +++ b/lib/Net/netent.pm @@ -1,9 +1,10 @@ package Net::netent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getnetbyname getnetbyaddr getnet); @EXPORT_OK = qw( $n_name @n_aliases diff --git a/lib/Net/protoent.pm b/lib/Net/protoent.pm index 737ff5a..334af78 100644 --- a/lib/Net/protoent.pm +++ b/lib/Net/protoent.pm @@ -1,9 +1,10 @@ package Net::protoent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getprotobyname getprotobynumber getprotoent); @EXPORT_OK = qw( $p_name @p_aliases $p_proto ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); diff --git a/lib/Net/servent.pm b/lib/Net/servent.pm index fb85dd0..c892af0 100644 --- a/lib/Net/servent.pm +++ b/lib/Net/servent.pm @@ -1,9 +1,10 @@ package Net::servent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getservbyname getservbyport getservent getserv); @EXPORT_OK = qw( $s_name @s_aliases $s_port $s_proto ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); diff --git a/lib/Shell.pm b/lib/Shell.pm index 0177479..706216a 100644 --- a/lib/Shell.pm +++ b/lib/Shell.pm @@ -1,5 +1,6 @@ package Shell; -use vars qw($capture_stderr $VERSION); +use 5.005_64; +our($capture_stderr $VERSION); $VERSION = '0.2'; diff --git a/lib/Test.pm b/lib/Test.pm index 2187e8c..c708f57 100644 --- a/lib/Test.pm +++ b/lib/Test.pm @@ -1,9 +1,10 @@ use strict; package Test; +use 5.005_64; use Test::Harness 1.1601 (); use Carp; -use vars (qw($VERSION @ISA @EXPORT @EXPORT_OK $ntest $TestLevel), #public-ish - qw($TESTOUT $ONFAIL %todo %history $planned @FAILDETAIL)); #private-ish +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $ntest, $TestLevel); #public-ish +our($TESTOUT, $ONFAIL, %todo, %history, $planned, @FAILDETAIL); #private-ish $VERSION = '1.13'; require Exporter; @ISA=('Exporter'); diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index a469cfa..61a29db 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -1,14 +1,14 @@ package Test::Harness; -BEGIN {require 5.002;} +use 5.005_64; use Exporter; use Benchmark; use Config; use FileHandle; use strict; -use vars qw($VERSION $verbose $switches $have_devel_corestack $curtest - @ISA @EXPORT @EXPORT_OK); +our($VERSION, $verbose, $switches, $have_devel_corestack, $curtest, + @ISA, @EXPORT, @EXPORT_OK); $have_devel_corestack = 0; $VERSION = "1.1604"; diff --git a/lib/Tie/Array.pm b/lib/Tie/Array.pm index 5ef83c4..32e269b 100644 --- a/lib/Tie/Array.pm +++ b/lib/Tie/Array.pm @@ -1,8 +1,9 @@ package Tie::Array; -use vars qw($VERSION); + +use 5.005_64; use strict; use Carp; -$VERSION = '1.01'; +our $VERSION = '1.01'; # Pod documentation after __END__ below. diff --git a/lib/Tie/Handle.pm b/lib/Tie/Handle.pm index 08756d5..f64e4b2 100644 --- a/lib/Tie/Handle.pm +++ b/lib/Tie/Handle.pm @@ -1,6 +1,7 @@ package Tie::Handle; -$VERSION = '1.0'; +use 5.005_64; +our $VERSION = '1.0'; =head1 NAME @@ -185,8 +186,7 @@ sub CLOSE { } package Tie::StdHandle; -use vars qw(@ISA); -@ISA = 'Tie::Handle'; +our @ISA = 'Tie::Handle'; use Carp; sub TIEHANDLE diff --git a/lib/Time/gmtime.pm b/lib/Time/gmtime.pm index 9b823f6..6ff4bc8 100644 --- a/lib/Time/gmtime.pm +++ b/lib/Time/gmtime.pm @@ -2,9 +2,10 @@ package Time::gmtime; use strict; use Time::tm; +use 5.005_64; +our(@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION); BEGIN { use Exporter (); - use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); @ISA = qw(Exporter Time::tm); @EXPORT = qw(gmtime gmctime); @EXPORT_OK = qw( diff --git a/lib/Time/localtime.pm b/lib/Time/localtime.pm index 18a36c7..0ca07af 100644 --- a/lib/Time/localtime.pm +++ b/lib/Time/localtime.pm @@ -2,9 +2,10 @@ package Time::localtime; use strict; use Time::tm; -BEGIN { +use 5.005_64; +our(@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION); +BEGIN { use Exporter (); - use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); @ISA = qw(Exporter Time::tm); @EXPORT = qw(localtime ctime); @EXPORT_OK = qw( diff --git a/lib/User/grent.pm b/lib/User/grent.pm index e4e226d..95e4189 100644 --- a/lib/User/grent.pm +++ b/lib/User/grent.pm @@ -1,9 +1,10 @@ package User::grent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getgrent getgrgid getgrnam getgr); @EXPORT_OK = qw($gr_name $gr_gid $gr_passwd $gr_mem @gr_members); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); diff --git a/lib/User/pwent.pm b/lib/User/pwent.pm index bb2dace..39bfea4 100644 --- a/lib/User/pwent.pm +++ b/lib/User/pwent.pm @@ -1,9 +1,10 @@ package User::pwent; use strict; +use 5.005_64; +our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); - use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS); @EXPORT = qw(getpwent getpwuid getpwnam getpw); @EXPORT_OK = qw( $pw_name $pw_passwd $pw_uid diff --git a/lib/base.pm b/lib/base.pm index cb5840e..3cb42f5 100644 --- a/lib/base.pm +++ b/lib/base.pm @@ -43,8 +43,9 @@ L =cut package base; -use vars qw($VERSION); -$VERSION = "1.01"; + +use 5.005_64; +our $VERSION = "1.01"; sub import { my $class = shift; diff --git a/lib/caller.pm b/lib/caller.pm index 91e67a1..98d4f3f 100644 --- a/lib/caller.pm +++ b/lib/caller.pm @@ -1,6 +1,5 @@ package caller; -use vars qw($VERSION); -$VERSION = "1.0"; +our $VERSION = "1.0"; =head1 NAME diff --git a/lib/constant.pm b/lib/constant.pm index 31f47fb..01570ca 100644 --- a/lib/constant.pm +++ b/lib/constant.pm @@ -1,13 +1,13 @@ package constant; use strict; -use vars qw( $VERSION %declared ); +use 5.005_64; + +our($VERSION, %declared); $VERSION = '1.01'; #======================================================================= -require 5.005_62; - # Some names are evil choices. my %keywords = map +($_, 1), qw{ BEGIN INIT STOP END DESTROY AUTOLOAD }; diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index e6a9127..a2c927b 100755 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -167,7 +167,7 @@ Tom Christiansen >, 25 June 1995. =cut -require 5.005_64; +use 5.005_64; use Carp; $VERSION = v1.0; diff --git a/lib/fields.pm b/lib/fields.pm index 2727a04..bc9e513 100644 --- a/lib/fields.pm +++ b/lib/fields.pm @@ -69,9 +69,10 @@ L =cut +use 5.005_64; use strict; no strict 'refs'; -use vars qw(%attr $VERSION); +our(%attr, $VERSION); $VERSION = "1.01"; diff --git a/lib/lib.pm b/lib/lib.pm index afc979b..879af16 100644 --- a/lib/lib.pm +++ b/lib/lib.pm @@ -1,13 +1,13 @@ package lib; -use vars qw(@ORIG_INC); +use 5.005_64; use Config; my $archname = $Config{'archname'}; my $ver = $Config{'version'}; -@ORIG_INC = @INC; # take a handy copy of 'original' value - +our @ORIG_INC = @INC; # take a handy copy of 'original' value +our $VERSION = '0.5564'; sub import { shift; diff --git a/lib/strict.pm b/lib/strict.pm index 99ed01d..f9d60af 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -38,8 +38,8 @@ use symbolic references (see L). =item C This generates a compile-time error if you access a variable that wasn't -declared via C, -localized via C or wasn't fully qualified. Because this is to avoid +declared via "our" or C, +localized via C, or wasn't fully qualified. Because this is to avoid variable suicide problems and subtle dynamic scoping issues, a merely local() variable isn't good enough. See L and L. @@ -50,7 +50,7 @@ L. local $foo = 9; # blows up package Cinna; - use vars qw/ $bar /; # Declares $bar in current package + our $bar; # Declares $bar in current package $bar = 'HgS'; # ok, global declared via pragma The local() generated a compile-time error because you just touched a global