Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace multiple 'use vars' by ‘our’ #16146

Closed
p5pRT opened this issue Sep 13, 2017 · 16 comments
Closed

Replace multiple 'use vars' by ‘our’ #16146

p5pRT opened this issue Sep 13, 2017 · 16 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 13, 2017

Migrated from rt.perl.org#132077 (status was 'resolved')

Searchable as RT132077$

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

From @atoomic

This is a bug report for perl from atoomic@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.26.0.


As mentioned by the vars doc https://perldoc.perl.org/vars.html usage of
'vars' pragma is discouraged and has been superseded by 'our' declarations
available in Perl v5.6.0 or later.

Additionally using 'vars' pragma increase the memory consumption of a
program by about 700 kB for no good reason.

This commit is about replacing the usage of 'vars' pragma by 'our' in blead
where it makes sense [leaving 'cpan' directory outside of the scope for
now, but including 'dist'].

IMO at the exception of some few scripts that we might want to run on older
perl versions for good reasons, we have no reason to support legacy perl
versions [ before 5.6.0 ] inside a perl 5.28+.

The 'diff' can also be read online at
0e3f444...atoomic:vars-our

_________
# using vars
perl -e 'use vars qw(@​ISA $AUTOLOAD $VERSION); print qx{grep RSS
/proc/$$/status} '
VmRSS​: 2588 kB

# using our instead
perl -e 'our (@​ISA, $AUTOLOAD, $VERSION); print qx{grep RSS
/proc/$$/status} '
VmRSS​: 1864 kB
_________



Flags​:
  category=core
  severity=low


Site configuration information for perl 5.26.0​:

Configured by cPanel at Thu Aug 31 17​:31​:39 CDT 2017.

Summary of my perl5 (revision 5 version 26 subversion 0) configuration​:

  Platform​:
  osname=linux
  osvers=3.10.0-123.20.1.el7.x86_64
  archname=x86_64-linux-64int
  uname='linux rpmbuild-64-centos-7.dev.cpanel.net
3.10.0-123.20.1.el7.x86_64 #1 smp thu jan 29 18​:05​:33 utc 2015 x86_64
x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel -Darchname=x86_64-linux-64int
-Dcc=/usr/bin/gcc -Dcpp=/usr/bin/cpp -Dusemymalloc=n -DDEBUGGING=none
-Doptimize=-Os -Accflags=-m64 -Dccflags=-DPERL_DISABLE_PMC -fPIC -DPIC
-I/usr/local/cpanel/3rdparty/perl/526/include
-I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib64
-Duseshrplib -Duselargefiles=yes -Duseposix=true -Dhint=recommended
-Duseperlio=yes -Dcppflags=-I/usr/local/cpanel/3rdparty/perl/526/include
-I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib64
-Dldflags=-L/usr/local/cpanel/3rdparty/lib64
-Dprefix=/usr/local/cpanel/3rdparty/perl/526
-Dsiteprefix=/opt/cpanel/perl5/526 -Dsitebin=/opt/cpanel/perl5/526/bin
-Dsitelib=/opt/cpanel/perl5/526/site_lib -Dusevendorprefix=true
-Dvendorbin=/usr/local/cpanel/3rdparty/perl/526/bin
-Dvendorprefix=/usr/local/cpanel/3rdparty/perl/526/lib64/perl5
-Dvendorlib=/usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib
-Dprivlib=/usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0
-Dman1dir=none -Dman3dir=none
-Dscriptdir=/usr/local/cpanel/3rdparty/perl/526/bin
-Dscriptdirexp=/usr/local/cpanel/3rdparty/perl/526/bin -Dsiteman1dir=none
-Dsiteman3dir=none -Dinstallman1dir=none -Dversiononly=no
-Dinstallusrbinperl=no -Dcf_by=cPanel -Dmyhostname=localhost
-Dperladmin=root@​localhost -Dcf_email=support@​cpanel.net
-Di_dbm=/usr/local/cpanel/3rdparty/include
-Di_gdbm=/usr/local/cpanel/3rdparty/include
-Di_ndbm=/usr/local/cpanel/3rdparty/include -DDB_File=true -Ud_dosuid
-Uuserelocatableinc -Umad -Uusethreads -Uusemultiplicity -Uusesocks
-Uuselongdouble -Aldflags=-L/usr/local/cpanel/3rdparty/lib64 -L/usr/lib64
-L/lib64 -lgdbm -Dlocincpth=/usr/local/cpanel/3rdparty/perl/526/include
/usr/local/cpanel/3rdparty/include /usr/local/include
-Duse64bitint -Uuse64bitall -Dlibpth=/usr/local/cpanel/3rdparty/lib64
/usr/local/lib64 /usr/local/lib /lib64 /usr/lib64 '
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=undef
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='/usr/bin/gcc'
  ccflags ='-DPERL_DISABLE_PMC -fPIC -DPIC
-I/usr/local/cpanel/3rdparty/perl/526/include
-I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib64
-m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_FORTIFY_SOURCE=2'
  optimize='-Os'
  cppflags='-I/usr/local/cpanel/3rdparty/perl/526/include
-I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib64
-DPERL_DISABLE_PMC -fPIC -DPIC
-I/usr/local/cpanel/3rdparty/perl/526/include
-I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib64
-m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong
-I/usr/local/include'
  ccversion=''
  gccversion='4.8.2 20140120 (Red Hat 4.8.2-16)'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='/usr/bin/gcc'
  ldflags ='-L/usr/local/cpanel/3rdparty/lib64
-L/usr/local/cpanel/3rdparty/lib64 -L/usr/lib64 -L/lib64 -lgdbm
-fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/cpanel/3rdparty/lib64 /usr/local/lib64 /usr/local/lib
/lib64 /usr/lib64 /usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64
/lib
  libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
-lgdbm_compat
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.17.so
  so=so
  useshrplib=true
  libperl=libperl.so
  gnulibc_version='2.17'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E
-Wl,-rpath,/usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int/CORE'
  cccdlflags='-fPIC'
  lddlflags='-shared -Os -L/usr/local/cpanel/3rdparty/lib64 -L/usr/lib64
-L/lib64 -L/usr/local/lib -fstack-protector-strong'

Locally applied patches​:
  cPanel patches
  cPanel INC path changes
  cPanel performance improvements to modules
  cPanel Immortal COW
  cPanel B and O performance fixups
  cPanel B​::C Declare Static Memory malloc patches
  cPanel Disable XS handshake


@​INC for perl 5.26.0​:
  /usr/local/cpanel

/usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/x86_64-linux-64int
  /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib

/usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0/x86_64-linux-64int
  /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/5.26.0
  /opt/cpanel/perl5/526/site_lib/x86_64-linux-64int
  /opt/cpanel/perl5/526/site_lib


Environment for perl 5.26.0​:
  HOME=/root
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=/usr/local/cpanel/3rdparty/perl/526/bin​:/usr/local/cpanel/3rdparty/perl/524/bin​:/usr/local/cpanel/3rdparty/perl/522/bin​:/usr/local/cpanel/3rdparty/perl/514/bin​:/usr/local/cpanel/3rdparty/bin​:/root/bin/​:/opt/local/bin​:/opt/local/sbin​:/usr/local/sbin​:/usr/local/bin​:/usr/sbin​:/usr/bin​:/opt/cpanel/composer/bin​:/root/.dotfiles/bin​:/root/perl5/bin​:/root/.rvm/bin​:/root/bin
  PERL5DB=use Devel​::NYTProf
  PERL5LIB=
  PERL_BADLANG (unset)
  PERL_CPANM_OPT=--quiet
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

From @jkeenan

On Wed, 13 Sep 2017 16​:47​:35 GMT, atoomic@​cpan.org wrote​:

This is a bug report for perl from atoomic@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.26.0.

-----------------------------------------------------------------

As mentioned by the vars doc https://perldoc.perl.org/vars.html usage
of
'vars' pragma is discouraged and has been superseded by 'our'
declarations
available in Perl v5.6.0 or later.

Additionally using 'vars' pragma increase the memory consumption of a
program by about 700 kB for no good reason.

Am I correct in thinking that, while that is an argument for replacing 'vars' with 'our' in files that get compiled into the perl executable, it is not necessarily an argument for that replacement in files under lib/, dist/ and ext/?

This commit is about replacing the usage of 'vars' pragma by 'our' in
blead
where it makes sense [leaving 'cpan' directory outside of the scope
for
now, but including 'dist'].

IMO at the exception of some few scripts that we might want to run on
older
perl versions for good reasons, we have no reason to support legacy
perl
versions [ before 5.6.0 ] inside a perl 5.28+.

The 'diff' can also be read online at
0e3f444...atoomic:vars-our

_________
# using vars
perl -e 'use vars qw(@​ISA $AUTOLOAD $VERSION); print qx{grep RSS
/proc/$$/status} '
VmRSS​: 2588 kB

# using our instead
perl -e 'our (@​ISA, $AUTOLOAD, $VERSION); print qx{grep RSS
/proc/$$/status} '
VmRSS​: 1864 kB
_________

Thanks for those diagnostics. However, we have to be sure we get similar improvements on other platforms. Those commands are Linux-specific. Can you provide similar commands for Windows? FreeBSD? etc.?

Also​: Instead of one massive commit, would you consider doing this in smaller chunks? Say, first dist/; then lib/; then ext/; then the really core stuff?

Also​: I recommend *not* touching files which are specific to platforms which we "technically" support but do not get smoke-testing results from. Examples​:

haiku/Haiku/Haiku.pm
symbian/ext/Moped/Msg/Msg.pm
symbian/sisify.pl

Thank you very much.
Jim Keenan

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

From @atoomic

Thanks for your quick return.

In fact, I really want to update 'use vars' in lib/, dist/ and ext/ directories as part of this commit. I explicitly left 'cpan' out of the list, as this is total different discussion (support for earlier versions than perl 5.6) and a few exceptions like lib/Env and some porting scripts.

Unfortunately, I'm not running Windows/FreeBSD on a daily basis, I'm not going to provide a one-liner to check the memory on these platforms, but the script should be pretty close to it, and I would expect the same advantage on these systems. The memory check on Linux was just here to illustrate a saving but is not the only argument. 'use vars' is pre perl 5.6 which was since replaced by 'our'. We advise against using 'vars'...

I'm fine splitting the main commit in smaller chunks, IMO it does not really make sense to split a commit in directories, would make more sense to split a commit in multiple when several ideas are mixed together (impacting the same files). But I understand this might make the review/merge process easier.

As you suggested I've removed update for suggested files​:
* haiku/Haiku/Haiku.pm
* symbian/ext/Moped/Msg/Msg.pm
* symbian/sisify.pl

and splitted the original commit in 5 sub commits​:
- 0001-Replace-multiple-use-vars-by-our-in-dist.patch
- 0002-Replace-multiple-use-vars-by-our-in-lib.patch
- 0003-Replace-multiple-use-vars-by-our-in-ext.patch
- 0004-Replace-multiple-use-vars-by-our-in-utils.patch
- 0005-Replace-multiple-use-vars-by-our-in-regen.patch

If this makes it easier, at least to read them Iâ��ve also pushed them to my github repo (do not have git bit on p5p at this time)​:

0e3f444...atoomic:vars-our-splitted

Let me know if you notice any required updates.

sincerely

On Wed, 13 Sep 2017 11​:27​:19 -0700, jkeenan wrote​:

On Wed, 13 Sep 2017 16​:47​:35 GMT, atoomic@​cpan.org wrote​:

This is a bug report for perl from atoomic@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.26.0.

-----------------------------------------------------------------

As mentioned by the vars doc https://perldoc.perl.org/vars.html usage
of
'vars' pragma is discouraged and has been superseded by 'our'
declarations
available in Perl v5.6.0 or later.

Additionally using 'vars' pragma increase the memory consumption of a
program by about 700 kB for no good reason.

Am I correct in thinking that, while that is an argument for replacing
'vars' with 'our' in files that get compiled into the perl executable,
it is not necessarily an argument for that replacement in files under
lib/, dist/ and ext/?

This commit is about replacing the usage of 'vars' pragma by 'our' in
blead
where it makes sense [leaving 'cpan' directory outside of the scope
for
now, but including 'dist'].

IMO at the exception of some few scripts that we might want to run on
older
perl versions for good reasons, we have no reason to support legacy
perl
versions [ before 5.6.0 ] inside a perl 5.28+.

The 'diff' can also be read online at
0e3f444...atoomic:vars-our

_________
# using vars
perl -e 'use vars qw(@​ISA $AUTOLOAD $VERSION); print qx{grep RSS
/proc/$$/status} '
VmRSS​: 2588 kB

# using our instead
perl -e 'our (@​ISA, $AUTOLOAD, $VERSION); print qx{grep RSS
/proc/$$/status} '
VmRSS​: 1864 kB
_________

Thanks for those diagnostics. However, we have to be sure we get
similar improvements on other platforms. Those commands are Linux-
specific. Can you provide similar commands for Windows? FreeBSD?
etc.?

Also​: Instead of one massive commit, would you consider doing this in
smaller chunks? Say, first dist/; then lib/; then ext/; then the
really core stuff?

Also​: I recommend *not* touching files which are specific to
platforms which we "technically" support but do not get smoke-testing
results from. Examples​:

haiku/Haiku/Haiku.pm
symbian/ext/Moped/Msg/Msg.pm
symbian/sisify.pl

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

From @atoomic

0001-Replace-multiple-use-vars-by-our-in-dist.patch
From 5895af2b5b0ecdbb23af7ee04276cbb92d9ecf6c Mon Sep 17 00:00:00 2001
From: Nicolas R <atoomic@cpan.org>
Date: Tue, 12 Sep 2017 13:20:25 -0600
Subject: [PATCH 1/5] Replace multiple 'use vars' by 'our' in dist

Using vars pragma is discouraged and has been superseded
by 'our' declarations available in Perl v5.6.0 or later.

Additionally using 'vars' pragma increase the memory
consumption of a program by about 700 kB for no good reason.

This commit is about replacing the usage of 'vars' pragma
by 'our' in blead where it makes sense. ( leaving 'cpan' directory
outside of the scope )

-- using vars
perl -e 'use vars qw(@ISA $AUTOLOAD $VERSION); print qx{grep RSS /proc/$$/status} '
VmRSS:        2588 kB

-- using our instead
perl -e 'our (@ISA, $AUTOLOAD, $VERSION); print qx{grep RSS /proc/$$/status} '
VmRSS:        1864 kB
---
 dist/Attribute-Handlers/lib/Attribute/Handlers.pm  |  4 ++--
 dist/Data-Dumper/t/pair.t                          |  2 +-
 dist/Dumpvalue/t/Dumpvalue.t                       |  2 +-
 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm    |  5 ++--
 .../lib/ExtUtils/CBuilder/Platform/Unix.pm         |  5 ++--
 .../lib/ExtUtils/CBuilder/Platform/VMS.pm          |  5 ++--
 .../lib/ExtUtils/CBuilder/Platform/Windows.pm      |  5 ++--
 .../lib/ExtUtils/CBuilder/Platform/aix.pm          |  5 ++--
 .../lib/ExtUtils/CBuilder/Platform/android.pm      |  5 ++--
 .../lib/ExtUtils/CBuilder/Platform/cygwin.pm       |  5 ++--
 .../lib/ExtUtils/CBuilder/Platform/darwin.pm       |  5 ++--
 .../lib/ExtUtils/CBuilder/Platform/dec_osf.pm      |  6 ++---
 .../lib/ExtUtils/CBuilder/Platform/os2.pm          |  5 ++--
 dist/ExtUtils-CBuilder/t/01-basic.t                |  3 +--
 dist/Filter-Simple/lib/Filter/Simple.pm            |  6 ++---
 dist/I18N-LangTags/lib/I18N/LangTags.pm            | 12 +++++-----
 dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm     |  8 +++----
 dist/I18N-LangTags/lib/I18N/LangTags/List.pm       |  4 ++--
 dist/Locale-Maketext/lib/Locale/Maketext.pm        | 13 +++++-----
 dist/Locale-Maketext/lib/Locale/Maketext.pod       |  2 +-
 dist/Locale-Maketext/t/60_super.t                  | 15 +++++-------
 dist/Locale-Maketext/t/70_fail_auto.t              |  6 ++---
 dist/Module-CoreList/identify-dependencies         |  2 +-
 dist/Module-CoreList/lib/Module/CoreList.pm        |  6 ++---
 .../lib/Module/CoreList/TieHashDelta.pm            |  3 +--
 dist/Module-CoreList/lib/Module/CoreList/Utils.pm  |  4 ++--
 dist/Net-Ping/lib/Net/Ping.pm                      | 28 ++++++++++------------
 dist/PathTools/Cwd.pm                              |  9 ++++---
 dist/PathTools/lib/File/Spec.pm                    |  5 ++--
 dist/PathTools/lib/File/Spec/AmigaOS.pm            |  5 ++--
 dist/PathTools/lib/File/Spec/Cygwin.pm             |  5 ++--
 dist/PathTools/lib/File/Spec/Epoc.pm               |  5 ++--
 dist/PathTools/lib/File/Spec/Functions.pm          | 12 ++++------
 dist/PathTools/lib/File/Spec/Mac.pm                |  5 ++--
 dist/PathTools/lib/File/Spec/OS2.pm                |  5 ++--
 dist/PathTools/lib/File/Spec/Unix.pm               |  3 +--
 dist/PathTools/lib/File/Spec/VMS.pm                |  5 ++--
 dist/PathTools/lib/File/Spec/Win32.pm              |  5 ++--
 dist/PathTools/t/Spec.t                            |  3 +--
 dist/Safe/t/safe1.t                                |  2 +-
 dist/Safe/t/safe2.t                                |  4 +---
 dist/SelfLoader/lib/SelfLoader.pm                  |  4 ++--
 dist/Storable/Storable.pm                          | 11 +++++----
 dist/Storable/t/canonical.t                        |  2 +-
 dist/Storable/t/code.t                             |  2 +-
 dist/Storable/t/downgrade.t                        |  6 ++---
 dist/Storable/t/interwork56.t                      |  2 +-
 dist/Storable/t/malice.t                           | 20 +++++++---------
 dist/Storable/t/recurse.t                          |  3 +--
 dist/Storable/t/testlib.pl                         |  3 +--
 dist/Storable/t/tied.t                             |  2 +-
 dist/Storable/t/weak.t                             |  2 +-
 dist/Test/lib/Test.pm                              |  9 ++++---
 dist/Test/t/fail.t                                 |  2 +-
 dist/Test/t/onfail.t                               |  3 +--
 dist/XSLoader/XSLoader_pm.PL                       | 11 ++++-----
 dist/base/lib/base.pm                              |  3 +--
 dist/base/lib/fields.pm                            |  4 ++--
 dist/base/t/base.t                                 |  2 +-
 dist/base/t/fields-5_6_0.t                         |  4 ++--
 dist/base/t/fields-5_8_0.t                         |  2 +-
 dist/constant/t/constant.t                         |  2 +-
 62 files changed, 150 insertions(+), 193 deletions(-)

diff --git a/dist/Attribute-Handlers/lib/Attribute/Handlers.pm b/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
index 67e4dc74ac..68b029a2d8 100644
--- a/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
+++ b/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
@@ -3,8 +3,8 @@ use 5.006;
 use Carp;
 use warnings;
 use strict;
-use vars qw($VERSION $AUTOLOAD);
-$VERSION = '1.00'; # remember to update version in POD!
+our $AUTOLOAD;
+our $VERSION = '1.01'; # remember to update version in POD!
 # $DB::single=1;
 
 my %symcache;
diff --git a/dist/Data-Dumper/t/pair.t b/dist/Data-Dumper/t/pair.t
index 9559bddab8..c7eafe472e 100644
--- a/dist/Data-Dumper/t/pair.t
+++ b/dist/Data-Dumper/t/pair.t
@@ -15,7 +15,7 @@ BEGIN {
 }
 
 use strict;
-use vars qw($want_colon $want_comma);
+our ($want_colon, $want_comma);
 use Test::More tests => 9;
 
 no warnings qw(once);
diff --git a/dist/Dumpvalue/t/Dumpvalue.t b/dist/Dumpvalue/t/Dumpvalue.t
index 64cf52ee0d..7063dd984c 100644
--- a/dist/Dumpvalue/t/Dumpvalue.t
+++ b/dist/Dumpvalue/t/Dumpvalue.t
@@ -14,7 +14,7 @@ BEGIN {
 	$^W = 0;
 }
 
-use vars qw( $foo @bar %baz );
+our ( $foo, @bar, %baz );
 
 use Test::More tests => 88;
 
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
index 9b9c8ba181..0d7bd05dab 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
@@ -1,5 +1,4 @@
 package ExtUtils::CBuilder;
-$ExtUtils::CBuilder::VERSION = '0.280228';
 use File::Spec ();
 use File::Path ();
 use File::Basename ();
@@ -7,7 +6,9 @@ use Perl::OSType qw/os_type/;
 
 use warnings;
 use strict;
-use vars qw(@ISA);
+
+our $VERSION = '0.280229';
+our @ISA;
 
 # We only use this once - don't waste a symbol table entry on it.
 # More importantly, don't make it an inheritable method.
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
index ba226a2b0b..2b4e3052a4 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
@@ -1,11 +1,10 @@
 package ExtUtils::CBuilder::Platform::Unix;
-$ExtUtils::CBuilder::Platform::Unix::VERSION = '0.280228';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Base;
 
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Base);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Base);
 
 sub link_executable {
   my $self = shift;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
index a3903c7c5b..18b4b95e9b 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
@@ -1,11 +1,10 @@
 package ExtUtils::CBuilder::Platform::VMS;
-$ExtUtils::CBuilder::Platform::VMS::VERSION = '0.280228';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Base;
 
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Base);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Base);
 
 use File::Spec::Functions qw(catfile catdir);
 use Config;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
index 60e2b637c1..699f2536ff 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
@@ -1,5 +1,4 @@
 package ExtUtils::CBuilder::Platform::Windows;
-$ExtUtils::CBuilder::Platform::Windows::VERSION = '0.280228';
 use strict;
 use warnings;
 
@@ -9,8 +8,8 @@ use File::Spec;
 use ExtUtils::CBuilder::Base;
 use IO::File;
 
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Base);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Base);
 
 =begin comment
 
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
index 15ed01a24a..424e715c40 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
@@ -1,12 +1,11 @@
 package ExtUtils::CBuilder::Platform::aix;
-$ExtUtils::CBuilder::Platform::aix::VERSION = '0.280228';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Platform::Unix;
 use File::Spec;
 
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 sub need_prelink { 1 }
 
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
index a0a03fca65..cd0802716f 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
@@ -1,13 +1,12 @@
 package ExtUtils::CBuilder::Platform::android;
-$ExtUtils::CBuilder::Platform::android::VERSION = '0.280228';
 use warnings;
 use strict;
 use File::Spec;
 use ExtUtils::CBuilder::Platform::Unix;
 use Config;
 
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 # The Android linker will not recognize symbols from
 # libperl unless the module explicitly depends on it.
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
index d9c7d66e2a..d5e5b558f4 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
@@ -1,12 +1,11 @@
 package ExtUtils::CBuilder::Platform::cygwin;
-$ExtUtils::CBuilder::Platform::cygwin::VERSION = '0.280228';
 use warnings;
 use strict;
 use File::Spec;
 use ExtUtils::CBuilder::Platform::Unix;
 
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 # TODO: If a specific exe_file name is requested, if the exe created
 # doesn't have that name, we might want to rename it.  Apparently asking
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
index 99894ec365..7d49f0df06 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
@@ -1,11 +1,10 @@
 package ExtUtils::CBuilder::Platform::darwin;
-$ExtUtils::CBuilder::Platform::darwin::VERSION = '0.280228';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Platform::Unix;
 
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 sub compile {
   my $self = shift;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
index bb71334c86..51c5b47939 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
@@ -1,12 +1,10 @@
 package ExtUtils::CBuilder::Platform::dec_osf;
-$ExtUtils::CBuilder::Platform::dec_osf::VERSION = '0.280228';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Platform::Unix;
 use File::Spec;
-
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 sub link_executable {
   my $self = shift;
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm
index 48ccdef8cd..96945a1d09 100644
--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm
@@ -1,11 +1,10 @@
 package ExtUtils::CBuilder::Platform::os2;
-$ExtUtils::CBuilder::Platform::os2::VERSION = '0.280228';
 use warnings;
 use strict;
 use ExtUtils::CBuilder::Platform::Unix;
 
-use vars qw(@ISA);
-@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+our $VERSION = '0.280229';
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 sub need_prelink { 1 }
 
diff --git a/dist/ExtUtils-CBuilder/t/01-basic.t b/dist/ExtUtils-CBuilder/t/01-basic.t
index 3db8581db6..d6b75e9d0b 100644
--- a/dist/ExtUtils-CBuilder/t/01-basic.t
+++ b/dist/ExtUtils-CBuilder/t/01-basic.t
@@ -75,8 +75,7 @@ SKIP: {
 # include_dirs should be settable as string or list
 {
   package Sub;
-  use vars '@ISA';
-  @ISA = ('ExtUtils::CBuilder');
+  our @ISA = ('ExtUtils::CBuilder');
   my $saw = 0;
   sub do_system {
     if ($^O eq "MSWin32") {
diff --git a/dist/Filter-Simple/lib/Filter/Simple.pm b/dist/Filter-Simple/lib/Filter/Simple.pm
index 082fe954bf..1dcf3c80bf 100644
--- a/dist/Filter-Simple/lib/Filter/Simple.pm
+++ b/dist/Filter-Simple/lib/Filter/Simple.pm
@@ -2,14 +2,12 @@ package Filter::Simple;
 
 use Text::Balanced ':ALL';
 
-use vars qw{ $VERSION @EXPORT };
-
-$VERSION = '0.94';
+our $VERSION = '0.95';
 
 use Filter::Util::Call;
 use Carp;
 
-@EXPORT = qw( FILTER FILTER_ONLY );
+our @EXPORT = qw( FILTER FILTER_ONLY );
 
 
 sub import {
diff --git a/dist/I18N-LangTags/lib/I18N/LangTags.pm b/dist/I18N-LangTags/lib/I18N/LangTags.pm
index c4d9ceab3d..3358d60274 100644
--- a/dist/I18N-LangTags/lib/I18N/LangTags.pm
+++ b/dist/I18N-LangTags/lib/I18N/LangTags.pm
@@ -5,11 +5,10 @@
 require 5.000;
 package I18N::LangTags;
 use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION %Panic);
 require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw();
-@EXPORT_OK = qw(is_language_tag same_language_tag
+our @ISA = qw(Exporter);
+our @EXPORT = qw();
+our @EXPORT_OK = qw(is_language_tag same_language_tag
                 extract_language_tags super_languages
                 similarity_language_tag is_dialect_of
                 locale2language_tag alternate_language_tags
@@ -17,9 +16,10 @@ require Exporter;
                 implicate_supers
                 implicate_supers_strictly
                );
-%EXPORT_TAGS = ('ALL' => \@EXPORT_OK);
+our %EXPORT_TAGS = ('ALL' => \@EXPORT_OK);
 
-$VERSION = "0.42";
+our $VERSION = "0.43";
+our %Panic;
 
 sub uniq { my %seen; return grep(!($seen{$_}++), @_); } # a util function
 
diff --git a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
index a0f3d1db8d..16b91db336 100644
--- a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
+++ b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
@@ -5,14 +5,14 @@ require 5;
 package I18N::LangTags::Detect;
 use strict;
 
-use vars qw( @ISA $VERSION $MATCH_SUPERS $USING_LANGUAGE_TAGS
-             $USE_LITERALS $MATCH_SUPERS_TIGHTLY);
+our ( $MATCH_SUPERS, $USING_LANGUAGE_TAGS,
+             $USE_LITERALS, $MATCH_SUPERS_TIGHTLY);
 
 BEGIN { unless(defined &DEBUG) { *DEBUG = sub () {0} } }
  # define the constant 'DEBUG' at compile-time
 
-$VERSION = "1.06";
-@ISA = ();
+our $VERSION = "1.07";
+our @ISA = ();
 use I18N::LangTags qw(alternate_language_tags locale2language_tag);
 
 sub _uniq { my %seen; return grep(!($seen{$_}++), @_); }
diff --git a/dist/I18N-LangTags/lib/I18N/LangTags/List.pm b/dist/I18N-LangTags/lib/I18N/LangTags/List.pm
index 786d7b89bb..5eef8eebaf 100644
--- a/dist/I18N-LangTags/lib/I18N/LangTags/List.pm
+++ b/dist/I18N-LangTags/lib/I18N/LangTags/List.pm
@@ -3,8 +3,8 @@ require 5;
 package I18N::LangTags::List;
 #  Time-stamp: "2004-10-06 23:26:21 ADT"
 use strict;
-use vars qw(%Name %Is_Disrec $Debug $VERSION);
-$VERSION = '0.39';
+our (%Name, %Is_Disrec, $Debug);
+our $VERSION = '0.40';
 # POD at the end.
 
 #----------------------------------------------------------------------
diff --git a/dist/Locale-Maketext/lib/Locale/Maketext.pm b/dist/Locale-Maketext/lib/Locale/Maketext.pm
index 36d0c05566..f70438b78d 100644
--- a/dist/Locale-Maketext/lib/Locale/Maketext.pm
+++ b/dist/Locale-Maketext/lib/Locale/Maketext.pm
@@ -1,7 +1,6 @@
 package Locale::Maketext;
 use strict;
-use vars qw( @ISA $VERSION $MATCH_SUPERS $USING_LANGUAGE_TAGS
-$USE_LITERALS $MATCH_SUPERS_TIGHTLY);
+our $USE_LITERALS;
 use Carp ();
 use I18N::LangTags ();
 use I18N::LangTags::Detect ();
@@ -26,12 +25,12 @@ BEGIN {
 }
 
 
-$VERSION = '1.28';
-@ISA = ();
+our $VERSION = '1.29';
+our @ISA = ();
 
-$MATCH_SUPERS = 1;
-$MATCH_SUPERS_TIGHTLY = 1;
-$USING_LANGUAGE_TAGS  = 1;
+our $MATCH_SUPERS = 1;
+our $MATCH_SUPERS_TIGHTLY = 1;
+our $USING_LANGUAGE_TAGS  = 1;
 # Turning this off is somewhat of a security risk in that little or no
 # checking will be done on the legality of tokens passed to the
 # eval("use $module_name") in _try_use.  If you turn this off, you have
diff --git a/dist/Locale-Maketext/lib/Locale/Maketext.pod b/dist/Locale-Maketext/lib/Locale/Maketext.pod
index 564e5afd0b..24c8f24d8f 100644
--- a/dist/Locale-Maketext/lib/Locale/Maketext.pod
+++ b/dist/Locale-Maketext/lib/Locale/Maketext.pod
@@ -1226,7 +1226,7 @@ If you get tired of constantly saying C<print $lh-E<gt>maketext>,
 consider making a functional wrapper for it, like so:
 
   use Projname::L10N;
-  use vars qw($lh);
+  our $lh;
   $lh = Projname::L10N->get_handle(...) || die "Language?";
   sub pmt (@) { print( $lh->maketext(@_)) }
    # "pmt" is short for "Print MakeText"
diff --git a/dist/Locale-Maketext/t/60_super.t b/dist/Locale-Maketext/t/60_super.t
index d54fc33007..5ac095910e 100644
--- a/dist/Locale-Maketext/t/60_super.t
+++ b/dist/Locale-Maketext/t/60_super.t
@@ -9,23 +9,20 @@ BEGIN {
 
 {
     package Whunk::L10N;
-    use vars qw(@ISA %Lexicon);
-    @ISA =  'Locale::Maketext';
-    %Lexicon = ('hello' => 'SROBLR!');
+    our @ISA =  'Locale::Maketext';
+    our %Lexicon = ('hello' => 'SROBLR!');
 }
 
 {
     package Whunk::L10N::en;
-    use vars qw(@ISA %Lexicon);
-    @ISA =  'Whunk::L10N';
-    %Lexicon = ('hello' => 'HI AND STUFF!');
+    our @ISA =  'Whunk::L10N';
+    our %Lexicon = ('hello' => 'HI AND STUFF!');
 }
 
 {
     package Whunk::L10N::zh_tw;
-    use vars qw(@ISA %Lexicon);
-    @ISA =  'Whunk::L10N';
-    %Lexicon = ('hello' => 'NIHAU JOE!');
+    our @ISA =  'Whunk::L10N';
+    our %Lexicon = ('hello' => 'NIHAU JOE!');
 }
 
 $ENV{'REQUEST_METHOD'} = 'GET';
diff --git a/dist/Locale-Maketext/t/70_fail_auto.t b/dist/Locale-Maketext/t/70_fail_auto.t
index 44fe54d1b5..df0de3eb3c 100644
--- a/dist/Locale-Maketext/t/70_fail_auto.t
+++ b/dist/Locale-Maketext/t/70_fail_auto.t
@@ -9,14 +9,12 @@ BEGIN {
 
 {
     package Whunk::L10N;
-    use vars qw(@ISA);
-    @ISA =  'Locale::Maketext';
+    our @ISA =  'Locale::Maketext';
 }
 
 {
     package Whunk::L10N::en;
-    use vars qw(@ISA);
-    @ISA = 'Whunk::L10N';
+    our @ISA = 'Whunk::L10N';
 }
 
 my $lh = Whunk::L10N->get_handle('en');
diff --git a/dist/Module-CoreList/identify-dependencies b/dist/Module-CoreList/identify-dependencies
index 1e33f2d193..faa88f2f0f 100644
--- a/dist/Module-CoreList/identify-dependencies
+++ b/dist/Module-CoreList/identify-dependencies
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use Module::CoreList;
 
-use vars qw/%modules/;
+our %modules;
 
 my @files = @ARGV;
 unless (@files) {
diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm
index 24bd67f9ef..d16ddead54 100644
--- a/dist/Module-CoreList/lib/Module/CoreList.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList.pm
@@ -1,9 +1,9 @@
 package Module::CoreList;
 use strict;
-use vars qw/$VERSION %released %version %families %upstream
-	    %bug_tracker %deprecated %delta/;
+our ( %released, %version, %families, %upstream,
+	    %bug_tracker, %deprecated, %delta );
 use version;
-$VERSION = '5.20170920';
+our $VERSION = '5.20170920';
 
 sub PKG_PATTERN () { q#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z# }
 sub _looks_like_invocant ($) { local $@; !!eval { $_[0]->isa(__PACKAGE__) } }
diff --git a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
index 553dc99d18..610d813838 100644
--- a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
@@ -1,9 +1,8 @@
 # For internal Module::CoreList use only.
 package Module::CoreList::TieHashDelta;
 use strict;
-use vars qw($VERSION);
 
-$VERSION = '5.20170920';
+our $VERSION = '5.20170920';
 
 sub TIEHASH {
     my ($class, $changed, $removed, $parent) = @_;
diff --git a/dist/Module-CoreList/lib/Module/CoreList/Utils.pm b/dist/Module-CoreList/lib/Module/CoreList/Utils.pm
index 1660d02b1f..6cab939fa4 100644
--- a/dist/Module-CoreList/lib/Module/CoreList/Utils.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList/Utils.pm
@@ -2,10 +2,10 @@ package Module::CoreList::Utils;
 
 use strict;
 use warnings;
-use vars qw[$VERSION %utilities];
 use Module::CoreList;
 
-$VERSION = '5.20170920';
+our $VERSION = '5.20170920';
+our %utilities;
 
 sub utilities {
     my $perl = shift;
diff --git a/dist/Net-Ping/lib/Net/Ping.pm b/dist/Net-Ping/lib/Net/Ping.pm
index 13cbe81b6a..c8da6300df 100644
--- a/dist/Net-Ping/lib/Net/Ping.pm
+++ b/dist/Net-Ping/lib/Net/Ping.pm
@@ -4,9 +4,7 @@ require 5.002;
 require Exporter;
 
 use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION
-            $def_timeout $def_proto $def_factor $def_family
-            $max_datasize $pingstring $hires $source_verify $syn_forking);
+our $hires;
 use Fcntl qw( F_GETFL F_SETFL O_NONBLOCK );
 use Socket qw( SOCK_DGRAM SOCK_STREAM SOCK_RAW AF_INET PF_INET IPPROTO_TCP
 	       SOL_SOCKET SO_ERROR SO_BROADCAST
@@ -18,22 +16,22 @@ use FileHandle;
 use Carp;
 use Time::HiRes;
 
-@ISA = qw(Exporter);
-@EXPORT = qw(pingecho);
-@EXPORT_OK = qw(wakeonlan);
-$VERSION = "2.55";
+our @ISA = qw(Exporter);
+our @EXPORT = qw(pingecho);
+our @EXPORT_OK = qw(wakeonlan);
+our $VERSION = "2.56";
 
 # Globals
 
-$def_timeout = 5;           # Default timeout to wait for a reply
-$def_proto = "tcp";         # Default protocol to use for pinging
-$def_factor = 1.2;          # Default exponential backoff rate.
-$def_family = AF_INET;      # Default family.
-$max_datasize = 1024;       # Maximum data bytes in a packet
+our $def_timeout = 5;           # Default timeout to wait for a reply
+our $def_proto = "tcp";         # Default protocol to use for pinging
+our $def_factor = 1.2;          # Default exponential backoff rate.
+our $def_family = AF_INET;      # Default family.
+our $max_datasize = 1024;       # Maximum data bytes in a packet
 # The data we exchange with the server for the stream protocol
-$pingstring = "pingschwingping!\n";
-$source_verify = 1;         # Default is to verify source endpoint
-$syn_forking = 0;
+our $pingstring = "pingschwingping!\n";
+our $source_verify = 1;         # Default is to verify source endpoint
+our $syn_forking = 0;
 
 # Constants
 
diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index cc77e58e2b..0315622396 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -1,16 +1,15 @@
 package Cwd;
 use strict;
 use Exporter;
-use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 my $xs_version = $VERSION;
 $VERSION =~ tr/_//d;
 
-@ISA = qw/ Exporter /;
-@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
+our @ISA = qw/ Exporter /;
+our @EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
 push @EXPORT, qw(getdcwd) if $^O eq 'MSWin32';
-@EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
+our @EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
 
 # sys_cwd may keep the builtin command
 
diff --git a/dist/PathTools/lib/File/Spec.pm b/dist/PathTools/lib/File/Spec.pm
index aa2a5c80b3..366e6b9c6f 100644
--- a/dist/PathTools/lib/File/Spec.pm
+++ b/dist/PathTools/lib/File/Spec.pm
@@ -1,9 +1,8 @@
 package File::Spec;
 
 use strict;
-use vars qw(@ISA $VERSION);
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
 my %module = (MacOS   => 'Mac',
@@ -21,7 +20,7 @@ my %module = (MacOS   => 'Mac',
 my $module = $module{$^O} || 'Unix';
 
 require "File/Spec/$module.pm";
-@ISA = ("File::Spec::$module");
+our @ISA = ("File::Spec::$module");
 
 1;
 
diff --git a/dist/PathTools/lib/File/Spec/AmigaOS.pm b/dist/PathTools/lib/File/Spec/AmigaOS.pm
index 0af106cd0a..316f67c76c 100644
--- a/dist/PathTools/lib/File/Spec/AmigaOS.pm
+++ b/dist/PathTools/lib/File/Spec/AmigaOS.pm
@@ -1,13 +1,12 @@
 package File::Spec::AmigaOS;
 
 use strict;
-use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
-@ISA = qw(File::Spec::Unix);
+our @ISA = qw(File::Spec::Unix);
 
 =head1 NAME
 
diff --git a/dist/PathTools/lib/File/Spec/Cygwin.pm b/dist/PathTools/lib/File/Spec/Cygwin.pm
index bffeb3d131..a0280b68a8 100644
--- a/dist/PathTools/lib/File/Spec/Cygwin.pm
+++ b/dist/PathTools/lib/File/Spec/Cygwin.pm
@@ -1,13 +1,12 @@
 package File::Spec::Cygwin;
 
 use strict;
-use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
-@ISA = qw(File::Spec::Unix);
+our @ISA = qw(File::Spec::Unix);
 
 =head1 NAME
 
diff --git a/dist/PathTools/lib/File/Spec/Epoc.pm b/dist/PathTools/lib/File/Spec/Epoc.pm
index a911b5e1eb..01f208688c 100644
--- a/dist/PathTools/lib/File/Spec/Epoc.pm
+++ b/dist/PathTools/lib/File/Spec/Epoc.pm
@@ -1,13 +1,12 @@
 package File::Spec::Epoc;
 
 use strict;
-use vars qw($VERSION @ISA);
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
 require File::Spec::Unix;
-@ISA = qw(File::Spec::Unix);
+our @ISA = qw(File::Spec::Unix);
 
 =head1 NAME
 
diff --git a/dist/PathTools/lib/File/Spec/Functions.pm b/dist/PathTools/lib/File/Spec/Functions.pm
index 71f0e6a750..22eeb4a0a9 100644
--- a/dist/PathTools/lib/File/Spec/Functions.pm
+++ b/dist/PathTools/lib/File/Spec/Functions.pm
@@ -3,16 +3,14 @@ package File::Spec::Functions;
 use File::Spec;
 use strict;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
-
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
 require Exporter;
 
-@ISA = qw(Exporter);
+our @ISA = qw(Exporter);
 
-@EXPORT = qw(
+our @EXPORT = qw(
 	canonpath
 	catdir
 	catfile
@@ -24,7 +22,7 @@ require Exporter;
 	path
 );
 
-@EXPORT_OK = qw(
+our @EXPORT_OK = qw(
 	devnull
 	tmpdir
 	splitpath
@@ -35,7 +33,7 @@ require Exporter;
 	case_tolerant
 );
 
-%EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
+our %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
 
 require File::Spec::Unix;
 my %udeps = (
diff --git a/dist/PathTools/lib/File/Spec/Mac.pm b/dist/PathTools/lib/File/Spec/Mac.pm
index 31e7a4dce0..082b9b8e80 100644
--- a/dist/PathTools/lib/File/Spec/Mac.pm
+++ b/dist/PathTools/lib/File/Spec/Mac.pm
@@ -1,13 +1,12 @@
 package File::Spec::Mac;
 
 use strict;
-use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
-@ISA = qw(File::Spec::Unix);
+our @ISA = qw(File::Spec::Unix);
 
 my $macfiles;
 if ($^O eq 'MacOS') {
diff --git a/dist/PathTools/lib/File/Spec/OS2.pm b/dist/PathTools/lib/File/Spec/OS2.pm
index 71ef5ac663..b126c279c2 100644
--- a/dist/PathTools/lib/File/Spec/OS2.pm
+++ b/dist/PathTools/lib/File/Spec/OS2.pm
@@ -1,13 +1,12 @@
 package File::Spec::OS2;
 
 use strict;
-use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
-@ISA = qw(File::Spec::Unix);
+our @ISA = qw(File::Spec::Unix);
 
 sub devnull {
     return "/dev/nul";
diff --git a/dist/PathTools/lib/File/Spec/Unix.pm b/dist/PathTools/lib/File/Spec/Unix.pm
index e1a30f8ca1..eecd8c80fc 100644
--- a/dist/PathTools/lib/File/Spec/Unix.pm
+++ b/dist/PathTools/lib/File/Spec/Unix.pm
@@ -1,9 +1,8 @@
 package File::Spec::Unix;
 
 use strict;
-use vars qw($VERSION);
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 my $xs_version = $VERSION;
 $VERSION =~ tr/_//d;
 
diff --git a/dist/PathTools/lib/File/Spec/VMS.pm b/dist/PathTools/lib/File/Spec/VMS.pm
index 20630c7678..5b32027526 100644
--- a/dist/PathTools/lib/File/Spec/VMS.pm
+++ b/dist/PathTools/lib/File/Spec/VMS.pm
@@ -1,13 +1,12 @@
 package File::Spec::VMS;
 
 use strict;
-use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
-@ISA = qw(File::Spec::Unix);
+our @ISA = qw(File::Spec::Unix);
 
 use File::Basename;
 use VMS::Filespec;
diff --git a/dist/PathTools/lib/File/Spec/Win32.pm b/dist/PathTools/lib/File/Spec/Win32.pm
index 9dc6cb0e4c..a62e594928 100644
--- a/dist/PathTools/lib/File/Spec/Win32.pm
+++ b/dist/PathTools/lib/File/Spec/Win32.pm
@@ -2,13 +2,12 @@ package File::Spec::Win32;
 
 use strict;
 
-use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.68';
+our $VERSION = '3.69';
 $VERSION =~ tr/_//d;
 
-@ISA = qw(File::Spec::Unix);
+our @ISA = qw(File::Spec::Unix);
 
 # Some regexes we use for path splitting
 my $DRIVE_RX = '[a-zA-Z]:';
diff --git a/dist/PathTools/t/Spec.t b/dist/PathTools/t/Spec.t
index d4fb69a2f1..2982b8c588 100644
--- a/dist/PathTools/t/Spec.t
+++ b/dist/PathTools/t/Spec.t
@@ -802,8 +802,7 @@ can_ok('File::Spec::Win32', '_cwd');
 
 {
     package File::Spec::FakeWin32;
-    use vars qw(@ISA);
-    @ISA = qw(File::Spec::Win32);
+    our @ISA = qw(File::Spec::Win32);
 
     sub _cwd { 'C:\\one\\two' }
 
diff --git a/dist/Safe/t/safe1.t b/dist/Safe/t/safe1.t
index f22bb1bfae..0f3d8e88d6 100644
--- a/dist/Safe/t/safe1.t
+++ b/dist/Safe/t/safe1.t
@@ -14,7 +14,7 @@ BEGIN {
 
 package test;	# test from somewhere other than main
 
-use vars qw($bar);
+our $bar;
 
 use Opcode 1.00, qw(opdesc opset opset_to_ops opset_to_hex
 	opmask_add full_opset empty_opset opcodes opmask define_optag);
diff --git a/dist/Safe/t/safe2.t b/dist/Safe/t/safe2.t
index b3f2dac21c..ee738529c4 100644
--- a/dist/Safe/t/safe2.t
+++ b/dist/Safe/t/safe2.t
@@ -11,8 +11,6 @@ BEGIN {
 # Tests Todo:
 #	'main' as root
 
-use vars qw($bar);
-
 use Opcode 1.00, qw(opdesc opset opset_to_ops opset_to_hex
 	opmask_add full_opset empty_opset opcodes opmask define_optag);
 
@@ -23,7 +21,7 @@ my $TB = Test::Builder->new();
 
 # Set up a package namespace of things to be visible to the unsafe code
 $Root::foo = "visible";
-$bar = "invisible";
+our $bar = "invisible";
 
 # Stop perl from moaning about identifies which are apparently only used once
 $Root::foo .= "";
diff --git a/dist/SelfLoader/lib/SelfLoader.pm b/dist/SelfLoader/lib/SelfLoader.pm
index a4c4af1239..0034e5be33 100644
--- a/dist/SelfLoader/lib/SelfLoader.pm
+++ b/dist/SelfLoader/lib/SelfLoader.pm
@@ -2,11 +2,11 @@ package SelfLoader;
 use 5.008;
 use strict;
 use IO::Handle;
-our $VERSION = "1.24";
+our $VERSION = "1.25";
 
 # The following bit of eval-magic is necessary to make this work on
 # perls < 5.009005.
-use vars qw/$AttrList/;
+our $AttrList;
 BEGIN {
   if ($] > 5.009004) {
     eval <<'NEWERPERL';
diff --git a/dist/Storable/Storable.pm b/dist/Storable/Storable.pm
index ae96a6c7ed..5c3a096e40 100644
--- a/dist/Storable/Storable.pm
+++ b/dist/Storable/Storable.pm
@@ -8,10 +8,11 @@
 
 require XSLoader;
 require Exporter;
-package Storable; @ISA = qw(Exporter);
+package Storable;
 
-@EXPORT = qw(store retrieve);
-@EXPORT_OK = qw(
+our @ISA = qw(Exporter);
+our @EXPORT = qw(store retrieve);
+our @EXPORT_OK = qw(
 	nstore store_fd nstore_fd fd_retrieve
 	freeze nfreeze thaw
 	dclone
@@ -20,9 +21,9 @@ package Storable; @ISA = qw(Exporter);
         file_magic read_magic
 );
 
-use vars qw($canonical $forgive_me $VERSION);
+our ($canonical, $forgive_me);
 
-$VERSION = '2.64';
+our $VERSION = '2.65';
 
 BEGIN {
     if (eval {
diff --git a/dist/Storable/t/canonical.t b/dist/Storable/t/canonical.t
index 35046dec67..3b930aab1b 100644
--- a/dist/Storable/t/canonical.t
+++ b/dist/Storable/t/canonical.t
@@ -18,7 +18,7 @@ sub BEGIN {
 
 
 use Storable qw(freeze thaw dclone);
-use vars qw($debugging $verbose);
+our ($debugging, $verbose);
 
 use Test::More tests => 8;
 
diff --git a/dist/Storable/t/code.t b/dist/Storable/t/code.t
index d31e2315ea..bb5c51c9e1 100644
--- a/dist/Storable/t/code.t
+++ b/dist/Storable/t/code.t
@@ -41,7 +41,7 @@ use Safe;
 
 #$Storable::DEBUGME = 1;
 
-use vars qw($freezed $thawed @obj @res $blessed_code);
+our ($freezed, $thawed, @obj, @res, $blessed_code);
 
 $blessed_code = bless sub { "blessed" }, "Some::Package";
 { package Another::Package; sub foo { __PACKAGE__ } }
diff --git a/dist/Storable/t/downgrade.t b/dist/Storable/t/downgrade.t
index db7d457498..617fb59ad4 100644
--- a/dist/Storable/t/downgrade.t
+++ b/dist/Storable/t/downgrade.t
@@ -26,12 +26,12 @@ use Test::More;
 use Storable 'thaw';
 
 use strict;
-use vars qw(@RESTRICT_TESTS %R_HASH %U_HASH $UTF8_CROAK $RESTRICTED_CROAK);
+our (%U_HASH, $UTF8_CROAK, $RESTRICTED_CROAK);
 
-@RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder',
+our @RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder',
                    'Locked keys', 'Locked keys placeholder',
                   );
-%R_HASH = (perl => 'rules');
+our %R_HASH = (perl => 'rules');
 
 if ($] > 5.007002) {
   # This is cheating. "\xdf" in Latin 1 is beta S, so will match \w if it
diff --git a/dist/Storable/t/interwork56.t b/dist/Storable/t/interwork56.t
index fac8af9c5d..239c8c1828 100644
--- a/dist/Storable/t/interwork56.t
+++ b/dist/Storable/t/interwork56.t
@@ -30,7 +30,7 @@ use Storable qw(freeze thaw);
 use strict;
 use Test::More tests=>30;
 
-use vars qw(%tests);
+our (%tests);
 
 {
     local $/ = "\n\nend\n";
diff --git a/dist/Storable/t/malice.t b/dist/Storable/t/malice.t
index 867a0d7505..e482f7c69b 100644
--- a/dist/Storable/t/malice.t
+++ b/dist/Storable/t/malice.t
@@ -25,17 +25,15 @@ sub BEGIN {
 }
 
 use strict;
-use vars qw($file_magic_str $other_magic $network_magic $byteorder
-            $major $minor $minor_write $fancy);
 
-$byteorder = $Config{byteorder};
+our $byteorder = $Config{byteorder};
 
-$file_magic_str = 'pst0';
-$other_magic = 7 + length $byteorder;
-$network_magic = 2;
-$major = 2;
-$minor = 10;
-$minor_write = $] >= 5.019 ? 10 : $] > 5.008 ? 9 : $] > 5.005_50 ? 8 : 4;
+our $file_magic_str = 'pst0';
+our $other_magic = 7 + length $byteorder;
+our $network_magic = 2;
+our $major = 2;
+our $minor = 10;
+our $minor_write = $] >= 5.019 ? 10 : $] > 5.008 ? 9 : $] > 5.005_50 ? 8 : 4;
 
 use Test::More;
 
@@ -45,13 +43,13 @@ use Test::More;
 # There are only 2 * 2 tests per byte in the parts of the header not present
 # for network order, and 2 tests per byte on the 'pst0' "magic number" only
 # present in files, but not in things store()ed to memory
-$fancy = ($] > 5.007 ? 2 : 0);
+our $fancy = ($] > 5.007 ? 2 : 0);
 
 plan tests => 372 + length ($byteorder) * 4 + $fancy * 8;
 
 use Storable qw (store retrieve freeze thaw nstore nfreeze);
 require 'testlib.pl';
-use vars '$file';
+our $file;
 
 # The chr 256 is a hack to force the hash to always have the utf8 keys flag
 # set on 5.7.3 and later. Otherwise the test fails if run with -Mutf8 because
diff --git a/dist/Storable/t/recurse.t b/dist/Storable/t/recurse.t
index 399101cc4a..cd1deb75b5 100644
--- a/dist/Storable/t/recurse.t
+++ b/dist/Storable/t/recurse.t
@@ -301,12 +301,11 @@ sub STORABLE_freeze {
 sub STORABLE_thaw { } # Not really used
 
 package main;
-use vars qw($refcount_ok);
 
 my $o = CLASS_OTHER->make();
 my $c2 = CLASS_2->make($o);
 my $so = thaw freeze $o;
 
-$refcount_ok = 0;
+our $refcount_ok = 0;
 thaw freeze(Foo3->new);
 is($refcount_ok, 1);
diff --git a/dist/Storable/t/testlib.pl b/dist/Storable/t/testlib.pl
index 9b07dd45f9..69aa2c83b8 100644
--- a/dist/Storable/t/testlib.pl
+++ b/dist/Storable/t/testlib.pl
@@ -1,8 +1,7 @@
 #!perl -w
 use strict;
-use vars '$file';
 
-$file = "storable-testfile.$$";
+our $file = "storable-testfile.$$";
 die "Temporary file '$file' already exists" if -e $file;
 
 END { while (-f $file) {unlink $file or die "Can't unlink '$file': $!" }}
diff --git a/dist/Storable/t/tied.t b/dist/Storable/t/tied.t
index 921117dd8b..f327a94476 100644
--- a/dist/Storable/t/tied.t
+++ b/dist/Storable/t/tied.t
@@ -203,7 +203,7 @@ is($FAULT::fault, 2);
 {
     package P;
     use Storable qw(freeze thaw);
-    use vars qw($a $b);
+    our ($a, $b);
     $b = "not ok ";
     sub TIESCALAR { bless \$a } sub FETCH { "ok " }
     tie $a, P; my $r = thaw freeze \$a; $b = $$r;
diff --git a/dist/Storable/t/weak.t b/dist/Storable/t/weak.t
index 0a06b0dcf6..0ee28c64d6 100644
--- a/dist/Storable/t/weak.t
+++ b/dist/Storable/t/weak.t
@@ -31,7 +31,7 @@ sub BEGIN {
 use Test::More 'no_plan';
 use Storable qw (store retrieve freeze thaw nstore nfreeze);
 require 'testlib.pl';
-use vars '$file';
+our $file;
 use strict;
 
 sub tester {
diff --git a/dist/Test/lib/Test.pm b/dist/Test/lib/Test.pm
index ce544ffe19..58daf281ac 100644
--- a/dist/Test/lib/Test.pm
+++ b/dist/Test/lib/Test.pm
@@ -5,10 +5,9 @@ package Test;
 use strict;
 
 use Carp;
-use vars (qw($VERSION @ISA @EXPORT @EXPORT_OK $ntest $TestLevel), #public-ish
-          qw($TESTOUT $TESTERR %Program_Lines $told_about_diff
-             $ONFAIL %todo %history $planned @FAILDETAIL) #private-ish
-         );
+our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, $ntest, $TestLevel); #public-is
+our ($TESTOUT, $TESTERR, %Program_Lines, $told_about_diff,
+             $ONFAIL, %todo, %history, $planned, @FAILDETAIL); #private-ish
 
 # In case a test is run in a persistent environment.
 sub _reset_globals {
@@ -20,7 +19,7 @@ sub _reset_globals {
     $planned    = 0;
 }
 
-$VERSION = '1.30';
+$VERSION = '1.31';
 require Exporter;
 @ISA=('Exporter');
 
diff --git a/dist/Test/t/fail.t b/dist/Test/t/fail.t
index 9051a1f481..e131b4d9a6 100644
--- a/dist/Test/t/fail.t
+++ b/dist/Test/t/fail.t
@@ -1,6 +1,6 @@
 # -*-perl-*-
 use strict;
-use vars qw($Expect);
+our $Expect;
 use Test qw($TESTOUT $TESTERR $ntest ok skip plan); 
 plan tests => 14;
 
diff --git a/dist/Test/t/onfail.t b/dist/Test/t/onfail.t
index dd6b83ec15..fa478e55f1 100644
--- a/dist/Test/t/onfail.t
+++ b/dist/Test/t/onfail.t
@@ -2,11 +2,10 @@
 
 use strict;
 use Test qw($ntest plan ok $TESTOUT $TESTERR);
-use vars qw($mycnt);
 
 BEGIN { plan test => 6, onfail => \&myfail }
 
-$mycnt = 0;
+our $mycnt = 0;
 
 my $why = "zero != one";
 # sneak in a test that Test::Harness wont see
diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL
index 8012e35e32..f0aff84e56 100644
--- a/dist/XSLoader/XSLoader_pm.PL
+++ b/dist/XSLoader/XSLoader_pm.PL
@@ -11,7 +11,7 @@ print OUT <<'EOT';
 
 package XSLoader;
 
-$VERSION = "0.27";
+$VERSION = "0.28";
 
 #use strict;
 
@@ -324,10 +324,9 @@ If you want to have your cake and eat it too, you need a more complicated
 boilerplate.
 
     package YourPackage;
-    use vars qw($VERSION @ISA);
 
-    @ISA = qw( OnePackage OtherPackage );
-    $VERSION = '0.01';
+    our @ISA = qw( OnePackage OtherPackage );
+    our $VERSION = '0.01';
     eval {
        require XSLoader;
        XSLoader::load('YourPackage', $VERSION);
@@ -393,7 +392,7 @@ boilerplate as
 
     package YourPackage;
     use XSLoader;
-    use vars qw($VERSION @ISA);
+    our ($VERSION, @ISA);
 
     BEGIN {
        @ISA = qw( OnePackage OtherPackage );
@@ -416,7 +415,7 @@ this:
 
     package YourPackage;
     use XSLoader;
-    use vars qw($VERSION @ISA);
+    our ($VERSION, @ISA);
 
     BEGIN {
        @ISA = qw( OnePackage OtherPackage );
diff --git a/dist/base/lib/base.pm b/dist/base/lib/base.pm
index 017574eaff..fb48fc295b 100644
--- a/dist/base/lib/base.pm
+++ b/dist/base/lib/base.pm
@@ -2,8 +2,7 @@ use 5.008;
 package base;
 
 use strict 'vars';
-use vars qw($VERSION);
-$VERSION = '2.26';
+our $VERSION = '2.27';
 $VERSION =~ tr/_//d;
 
 # simplest way to avoid indexing of the package: no package statement
diff --git a/dist/base/lib/fields.pm b/dist/base/lib/fields.pm
index c40978bd90..93eba95bf9 100644
--- a/dist/base/lib/fields.pm
+++ b/dist/base/lib/fields.pm
@@ -10,9 +10,9 @@ unless( eval q{require warnings::register; warnings::register->import; 1} ) {
         Carp::carp(@_);
     }
 }
-use vars qw(%attr $VERSION);
+our %attr;
 
-$VERSION = '2.23';
+our $VERSION = '2.24';
 $VERSION =~ tr/_//d;
 
 # constant.pm is slow
diff --git a/dist/base/t/base.t b/dist/base/t/base.t
index 0bbb5be947..c56e9acb4d 100644
--- a/dist/base/t/base.t
+++ b/dist/base/t/base.t
@@ -8,7 +8,7 @@ use_ok('base');
 
 package No::Version;
 
-use vars qw($Foo);
+our $Foo;
 sub VERSION { 42 }
 
 package Test::Version;
diff --git a/dist/base/t/fields-5_6_0.t b/dist/base/t/fields-5_6_0.t
index 93bca34e2e..1f7d967851 100644
--- a/dist/base/t/fields-5_6_0.t
+++ b/dist/base/t/fields-5_6_0.t
@@ -8,7 +8,7 @@ if( $] >= 5.009 ) {
 }
 
 use strict;
-use vars qw($Total_tests);
+our $Total_tests;
 
 my $test_num = 1;
 BEGIN { $| = 1; $^W = 1; }
@@ -62,7 +62,7 @@ BEGIN {
 }
 
 use strict;
-use vars qw($DEBUG);
+our $DEBUG;
 
 package B1;
 use fields qw(b1 b2 b3);
diff --git a/dist/base/t/fields-5_8_0.t b/dist/base/t/fields-5_8_0.t
index 9abab94d39..2888ead9a8 100644
--- a/dist/base/t/fields-5_8_0.t
+++ b/dist/base/t/fields-5_8_0.t
@@ -22,7 +22,7 @@ BEGIN {
 }
 
 use strict;
-use vars qw($DEBUG);
+our $DEBUG;
 
 package B1;
 use fields qw(b1 b2 b3);
diff --git a/dist/constant/t/constant.t b/dist/constant/t/constant.t
index 442b81963c..80147c6a2d 100644
--- a/dist/constant/t/constant.t
+++ b/dist/constant/t/constant.t
@@ -1,7 +1,7 @@
 #!./perl -T
 
 use warnings;
-use vars qw{ @warnings $fagwoosh $putt $kloong};
+our ( @warnings, $fagwoosh, $putt, $kloong );
 BEGIN {				# ...and save 'em for later
     $SIG{'__WARN__'} = sub { push @warnings, @_ }
 }
-- 
2.14.1

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

From @atoomic

0002-Replace-multiple-use-vars-by-our-in-lib.patch
From b8953be4a5c3b30701632c2ea5f4f5b30cab0598 Mon Sep 17 00:00:00 2001
From: Nicolas R <atoomic@cpan.org>
Date: Tue, 12 Sep 2017 13:20:25 -0600
Subject: [PATCH 2/5] Replace multiple 'use vars' by 'our' in lib

Using vars pragma is discouraged and has been superseded
by 'our' declarations available in Perl v5.6.0 or later.

This commit is about replacing the usage of 'vars' pragma
by 'our' in 'lib' directory.
---
 lib/Benchmark.t          |  2 +-
 lib/Config/Extensions.pm |  4 ++--
 lib/ExtUtils/Embed.pm    | 15 ++++++---------
 lib/ExtUtils/XSSymSet.pm |  3 +--
 lib/File/stat.pm         | 12 +++++++++---
 lib/Net/hostent.pm       | 11 ++++++++---
 lib/Net/netent.pm        |  8 ++++++--
 lib/Net/protoent.pm      |  4 ++--
 lib/Net/servent.pm       |  4 ++--
 lib/Tie/Array.pm         |  5 ++---
 lib/Tie/Scalar.t         |  5 ++---
 lib/Tie/StdHandle.pm     |  5 ++---
 lib/Time/gmtime.pm       | 10 +++++++---
 lib/Time/localtime.pm    | 11 ++++++++---
 lib/User/grent.pm        |  4 ++--
 lib/User/pwent.pm        | 11 +++++++----
 lib/blib.pm              |  5 ++---
 17 files changed, 69 insertions(+), 50 deletions(-)

diff --git a/lib/Benchmark.t b/lib/Benchmark.t
index 4bf01b222e..523618f576 100644
--- a/lib/Benchmark.t
+++ b/lib/Benchmark.t
@@ -7,7 +7,7 @@ BEGIN {
 
 use warnings;
 use strict;
-use vars qw($foo $bar $baz $ballast);
+our ($foo, $bar, $baz, $ballast);
 use Test::More tests => 213;
 
 use Benchmark qw(:all);
diff --git a/lib/Config/Extensions.pm b/lib/Config/Extensions.pm
index 82fb9e09e8..5c241e97ae 100644
--- a/lib/Config/Extensions.pm
+++ b/lib/Config/Extensions.pm
@@ -1,10 +1,10 @@
 package Config::Extensions;
 use strict;
-use vars qw(%Extensions $VERSION @ISA @EXPORT_OK);
+our (%Extensions, $VERSION, @ISA, @EXPORT_OK);
 use Config;
 require Exporter;
 
-$VERSION = '0.01';
+$VERSION = '0.02';
 @ISA = 'Exporter';
 @EXPORT_OK = '%Extensions';
 
diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm
index b26bf7382e..e75e41f8c4 100644
--- a/lib/ExtUtils/Embed.pm
+++ b/lib/ExtUtils/Embed.pm
@@ -3,22 +3,19 @@ require Exporter;
 use Config;
 require File::Spec;
 
-use vars qw(@ISA @EXPORT $VERSION
-	    @Extensions $Verbose $lib_ext
-	    $opt_o $opt_s 
-	    );
+our ( @Extensions, $opt_o, $opt_s );
 use strict;
 
 # This is not a dual-life module, so no need for development version numbers
-$VERSION = '1.34';
+our $VERSION = '1.35';
 
-@ISA = qw(Exporter);
-@EXPORT = qw(&xsinit &ldopts 
+our @ISA = qw(Exporter);
+our @EXPORT = qw(&xsinit &ldopts 
 	     &ccopts &ccflags &ccdlflags &perl_inc
 	     &xsi_header &xsi_protos &xsi_body);
 
-$Verbose = 0;
-$lib_ext = $Config{lib_ext} || '.a';
+our $Verbose = 0;
+our $lib_ext = $Config{lib_ext} || '.a';
 
 sub is_cmd { $0 eq '-e' }
 
diff --git a/lib/ExtUtils/XSSymSet.pm b/lib/ExtUtils/XSSymSet.pm
index 0dee12da92..29192d8702 100644
--- a/lib/ExtUtils/XSSymSet.pm
+++ b/lib/ExtUtils/XSSymSet.pm
@@ -2,8 +2,7 @@ package ExtUtils::XSSymSet;
 
 use strict;
 use Config;
-use vars qw( $VERSION );
-$VERSION = '1.3';
+our $VERSION = '1.4';
 
 
 sub new { 
diff --git a/lib/File/stat.pm b/lib/File/stat.pm
index b631fbf875..578c3118c8 100644
--- a/lib/File/stat.pm
+++ b/lib/File/stat.pm
@@ -10,9 +10,16 @@ BEGIN { *warnif = \&warnings::warnif }
 
 our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
 
-our $VERSION = '1.07';
+our $VERSION = '1.08';
+
+our @fields;
+our ( $st_dev, $st_ino, $st_mode,
+    $st_nlink, $st_uid, $st_gid,
+    $st_rdev, $st_size,
+    $st_atime, $st_mtime, $st_ctime,
+    $st_blksize, $st_blocks
+);
 
-my @fields;
 BEGIN { 
     use Exporter   ();
     @EXPORT      = qw(stat lstat);
@@ -25,7 +32,6 @@ BEGIN {
     @EXPORT_OK   = ( @fields, "stat_cando" );
     %EXPORT_TAGS = ( FIELDS => [ @fields, @EXPORT ] );
 }
-use vars @fields;
 
 use Fcntl qw(S_IRUSR S_IWUSR S_IXUSR);
 
diff --git a/lib/Net/hostent.pm b/lib/Net/hostent.pm
index 3a2fc01387..8831919fb4 100644
--- a/lib/Net/hostent.pm
+++ b/lib/Net/hostent.pm
@@ -2,8 +2,14 @@ package Net::hostent;
 use strict;
 
 use 5.006_001;
-our $VERSION = '1.01';
-our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+our $VERSION = '1.02';
+our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+our (
+      $h_name, @h_aliases,
+      $h_addrtype, $h_length,
+      @h_addr_list, $h_addr
+);
+ 
 BEGIN { 
     use Exporter   ();
     @EXPORT      = qw(gethostbyname gethostbyaddr gethost);
@@ -14,7 +20,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/Net/netent.pm b/lib/Net/netent.pm
index f7d32cb925..b21c5d11b8 100644
--- a/lib/Net/netent.pm
+++ b/lib/Net/netent.pm
@@ -2,8 +2,13 @@ package Net::netent;
 use strict;
 
 use 5.006_001;
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+our (
+    $n_name, @n_aliases,
+    $n_addrtype, $n_net
+);
+ 
 BEGIN { 
     use Exporter   ();
     @EXPORT      = qw(getnetbyname getnetbyaddr getnet);
@@ -13,7 +18,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/Net/protoent.pm b/lib/Net/protoent.pm
index 2cbccad3cb..cef20fbd0b 100644
--- a/lib/Net/protoent.pm
+++ b/lib/Net/protoent.pm
@@ -2,15 +2,15 @@ package Net::protoent;
 use strict;
 
 use 5.006_001;
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+our ( $p_name, @p_aliases, $p_proto );
 BEGIN { 
     use Exporter   ();
     @EXPORT      = qw(getprotobyname getprotobynumber getprotoent getproto);
     @EXPORT_OK   = qw( $p_name @p_aliases $p_proto );
     %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/Net/servent.pm b/lib/Net/servent.pm
index 78a1681455..a3b2bad2c2 100644
--- a/lib/Net/servent.pm
+++ b/lib/Net/servent.pm
@@ -2,15 +2,15 @@ package Net::servent;
 use strict;
 
 use 5.006_001;
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+our ( $s_name, @s_aliases, $s_port, $s_proto );
 BEGIN {
     use Exporter   ();
     @EXPORT      = qw(getservbyname getservbyport getservent getserv);
     @EXPORT_OK   = qw( $s_name @s_aliases $s_port $s_proto );
     %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/Tie/Array.pm b/lib/Tie/Array.pm
index e0516a2f30..192983b428 100644
--- a/lib/Tie/Array.pm
+++ b/lib/Tie/Array.pm
@@ -3,7 +3,7 @@ package Tie::Array;
 use 5.006_001;
 use strict;
 use Carp;
-our $VERSION = '1.06';
+our $VERSION = '1.07';
 
 # Pod documentation after __END__ below.
 
@@ -83,8 +83,7 @@ sub DELETE {
 }
 
 package Tie::StdArray;
-use vars qw(@ISA);
-@ISA = 'Tie::Array';
+our @ISA = 'Tie::Array';
 
 sub TIEARRAY  { bless [], $_[0] }
 sub FETCHSIZE { scalar @{$_[0]} }
diff --git a/lib/Tie/Scalar.t b/lib/Tie/Scalar.t
index 9be536f8b3..4a6fcfa526 100644
--- a/lib/Tie/Scalar.t
+++ b/lib/Tie/Scalar.t
@@ -9,14 +9,13 @@ BEGIN {
 package TieTest;
 
 use Tie::Scalar;
-use vars qw( @ISA );
-@ISA = qw( Tie::Scalar );
+our @ISA = qw( Tie::Scalar );
 
 sub new { 'Fooled you.' }
 
 package main;
 
-use vars qw( $flag );
+our $flag;
 use Test::More tests => 16;
 
 use_ok( 'Tie::Scalar' );
diff --git a/lib/Tie/StdHandle.pm b/lib/Tie/StdHandle.pm
index 0c58b706e4..dfb86634f0 100644
--- a/lib/Tie/StdHandle.pm
+++ b/lib/Tie/StdHandle.pm
@@ -3,9 +3,8 @@ package Tie::StdHandle;
 use strict;
 
 use Tie::Handle;
-use vars qw(@ISA $VERSION);
-@ISA = 'Tie::Handle';
-$VERSION = '4.4';
+our @ISA = 'Tie::Handle';
+our $VERSION = '4.5';
 
 =head1 NAME
 
diff --git a/lib/Time/gmtime.pm b/lib/Time/gmtime.pm
index eb5b371a00..99f470be51 100644
--- a/lib/Time/gmtime.pm
+++ b/lib/Time/gmtime.pm
@@ -4,7 +4,12 @@ use 5.006_001;
 
 use Time::tm;
 
-our(@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION);
+our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION);
+our (   $tm_sec, $tm_min, $tm_hour, $tm_mday,
+        $tm_mon, $tm_year, $tm_wday, $tm_yday, 
+		$tm_isdst,
+);
+ 
 BEGIN { 
     use Exporter   ();
     @ISA         = qw(Exporter Time::tm);
@@ -15,9 +20,8 @@ BEGIN {
 			$tm_isdst
 		    );
     %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] );
-    $VERSION     = 1.03;
+    $VERSION     = 1.04;
 }
-use vars      @EXPORT_OK;
 
 sub populate (@) {
     return unless @_;
diff --git a/lib/Time/localtime.pm b/lib/Time/localtime.pm
index c3d9fb3608..f2ef084038 100644
--- a/lib/Time/localtime.pm
+++ b/lib/Time/localtime.pm
@@ -4,7 +4,13 @@ use 5.006_001;
 
 use Time::tm;
 
-our(@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION);
+our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION);
+our (  
+      $tm_sec, $tm_min, $tm_hour, $tm_mday,
+      $tm_mon, $tm_year, $tm_wday, $tm_yday,
+      $tm_isdst
+);
+ 
 BEGIN {
     use Exporter   ();
     @ISA         = qw(Exporter Time::tm);
@@ -15,9 +21,8 @@ BEGIN {
 			$tm_isdst
 		    );
     %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] );
-    $VERSION     = 1.02;
+    $VERSION     = 1.03;
 }
-use vars      @EXPORT_OK;
 
 sub populate (@) {
     return unless @_;
diff --git a/lib/User/grent.pm b/lib/User/grent.pm
index ce6ee5ea44..b66771f2e1 100644
--- a/lib/User/grent.pm
+++ b/lib/User/grent.pm
@@ -2,15 +2,15 @@ package User::grent;
 use strict;
 
 use 5.006_001;
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+our ($gr_name, $gr_gid, $gr_passwd, $gr_mem, @gr_members);
 BEGIN { 
     use Exporter   ();
     @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 ] );
 }
-use vars      @EXPORT_OK;
 
 # Class::Struct forbids use of @ISA
 sub import { goto &Exporter::import }
diff --git a/lib/User/pwent.pm b/lib/User/pwent.pm
index 91d23bd3f6..3f82e8c861 100644
--- a/lib/User/pwent.pm
+++ b/lib/User/pwent.pm
@@ -1,7 +1,7 @@
 package User::pwent;
 
 use 5.006;
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 
 use strict;
 use warnings;
@@ -10,6 +10,12 @@ use Config;
 use Carp;
 
 our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+our ( $pw_name,    $pw_passwd,  $pw_uid,  $pw_gid,
+    $pw_gecos,   $pw_dir,     $pw_shell,
+    $pw_expire,  $pw_change,  $pw_class,
+    $pw_age,
+    $pw_quota,   $pw_comment,
+    );
 BEGIN {
     use Exporter   ();
     @EXPORT      = qw(getpwent getpwuid getpwnam getpw);
@@ -21,15 +27,12 @@ BEGIN {
                         $pw_expire  $pw_change  $pw_class
                         $pw_age
                         $pw_quota   $pw_comment
-                        $pw_expire
-
                    );
     %EXPORT_TAGS = (
         FIELDS => [ grep(/^\$pw_/, @EXPORT_OK), @EXPORT ],
         ALL    => [ @EXPORT, @EXPORT_OK ],
     );
 }
-use vars grep /^\$pw_/, @EXPORT_OK;
 
 #
 # XXX: these mean somebody hacked this module's source
diff --git a/lib/blib.pm b/lib/blib.pm
index b3ee3202b1..f8fd500d5e 100644
--- a/lib/blib.pm
+++ b/lib/blib.pm
@@ -39,9 +39,8 @@ Nick Ing-Simmons nik@tiuk.ti.com
 use Cwd;
 use File::Spec;
 
-use vars qw($VERSION $Verbose);
-$VERSION = '1.06';
-$Verbose = 0;
+our $VERSION = '1.07';
+our $Verbose = 0;
 
 sub import
 {
-- 
2.14.1

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

From @atoomic

0003-Replace-multiple-use-vars-by-our-in-ext.patch
From b920e9f1e68e231bfa3363e218a2ea68d5f05891 Mon Sep 17 00:00:00 2001
From: Nicolas R <atoomic@cpan.org>
Date: Tue, 12 Sep 2017 13:20:25 -0600
Subject: [PATCH 3/5] Replace multiple 'use vars' by 'our' in ext

Using vars pragma is discouraged and has been superseded
by 'our' declarations available in Perl v5.6.0 or later.

This commit is about replacing the usage of 'vars' pragma
by 'our' in 'ext' directory.
---
 ext/B/t/OptreeCheck.pm                         |  4 ++--
 ext/B/t/terse.t                                |  2 +-
 ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm |  8 +++-----
 ext/FileCache/lib/FileCache.pm                 |  6 +++---
 ext/FileCache/t/01open.t                       |  2 +-
 ext/FileCache/t/02maxopen.t                    |  2 +-
 ext/FileCache/t/03append.t                     |  2 +-
 ext/FileCache/t/06export.t                     |  2 +-
 ext/Hash-Util-FieldHash/t/12_hashwarn.t        |  3 +--
 ext/POSIX/t/sigaction.t                        |  2 +-
 ext/Pod-Html/lib/Pod/Html.pm                   |  9 ++++-----
 ext/VMS-DCLsym/DCLsym.pm                       |  5 ++---
 ext/VMS-Stdio/Stdio.pm                         | 11 +++++------
 ext/XS-APItest/t/autoload.t                    | 10 ++++------
 ext/XS-APItest/t/xsub_h.t                      |  2 +-
 ext/XS-Typemap/Typemap.pm                      |  6 ++----
 16 files changed, 33 insertions(+), 43 deletions(-)

diff --git a/ext/B/t/OptreeCheck.pm b/ext/B/t/OptreeCheck.pm
index e7af99ece1..537f3836de 100644
--- a/ext/B/t/OptreeCheck.pm
+++ b/ext/B/t/OptreeCheck.pm
@@ -2,10 +2,10 @@ package OptreeCheck;
 use parent 'Exporter';
 use strict;
 use warnings;
-use vars qw($TODO $Level $using_open);
+our ($TODO, $Level, $using_open);
 require "test.pl";
 
-our $VERSION = '0.15';
+our $VERSION = '0.16';
 
 # now export checkOptree, and those test.pl functions used by tests
 our @EXPORT = qw( checkOptree plan skip skip_all pass is like unlike
diff --git a/ext/B/t/terse.t b/ext/B/t/terse.t
index 26e2e76054..d332f4b9c0 100644
--- a/ext/B/t/terse.t
+++ b/ext/B/t/terse.t
@@ -63,7 +63,7 @@ warn "# didn't find " . join(' ', keys %ops) if keys %ops;
 # add it to the regex above too. (PADOPs are currently only produced
 # under ithreads, though).
 #
-use vars qw( $a $b );
+our ( $a, $b );
 sub bar {
 	# OP SVOP COP IV here or in sub definition
 	my @bar = (1, 2, 3);
diff --git a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
index 5d397b1bde..fec33a42c6 100644
--- a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
+++ b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
@@ -4,11 +4,9 @@ use strict;
 require Exporter;
 use ExtUtils::Embed 1.31, qw(xsi_header xsi_protos xsi_body);
 
-use vars qw($VERSION @ISA @EXPORT);
-
-@ISA = qw(Exporter);
-@EXPORT = qw(writemain);
-$VERSION = '1.06';
+our @ISA = qw(Exporter);
+our @EXPORT = qw(writemain);
+our $VERSION = '1.07';
 
 # blead will run this with miniperl, hence we can't use autodie or File::Temp
 my $temp;
diff --git a/ext/FileCache/lib/FileCache.pm b/ext/FileCache/lib/FileCache.pm
index 149e88133e..0834719d9b 100644
--- a/ext/FileCache/lib/FileCache.pm
+++ b/ext/FileCache/lib/FileCache.pm
@@ -1,6 +1,6 @@
 package FileCache;
 
-our $VERSION = '1.09';
+our $VERSION = '1.10';
 
 =head1 NAME
 
@@ -91,8 +91,8 @@ no strict 'refs';
 # These are not C<my> for legacy reasons.
 # Previous versions requested the user set $cacheout_maxopen by hand.
 # Some authors fiddled with %saw to overcome the clobber on initial open.
-use vars qw(%saw $cacheout_maxopen);
-$cacheout_maxopen = 16;
+our %saw;
+our $cacheout_maxopen = 16;
 
 use parent 'Exporter';
 our @EXPORT = qw[cacheout cacheout_close];
diff --git a/ext/FileCache/t/01open.t b/ext/FileCache/t/01open.t
index 07e01bac86..c01b25a424 100644
--- a/ext/FileCache/t/01open.t
+++ b/ext/FileCache/t/01open.t
@@ -2,7 +2,7 @@
 
 use FileCache;
 
-use vars qw(@files);
+our @files;
 BEGIN { @files = qw(foo bar baz quux Foo_Bar) }
 END   { 1 while unlink @files }
 
diff --git a/ext/FileCache/t/02maxopen.t b/ext/FileCache/t/02maxopen.t
index 00dbb1bd54..f3470c1086 100644
--- a/ext/FileCache/t/02maxopen.t
+++ b/ext/FileCache/t/02maxopen.t
@@ -1,7 +1,7 @@
 #!./perl
 
 use FileCache maxopen => 2;
-use vars qw(@files);
+our @files;
 BEGIN { @files = qw(foo bar baz quux) }
 END { 1 while unlink @files }
 
diff --git a/ext/FileCache/t/03append.t b/ext/FileCache/t/03append.t
index f765d445ce..3a82679357 100644
--- a/ext/FileCache/t/03append.t
+++ b/ext/FileCache/t/03append.t
@@ -1,7 +1,7 @@
 #!./perl
 
 use FileCache maxopen => 2;
-use vars qw(@files);
+our @files;
 BEGIN { @files = qw(foo bar baz quux Foo_Bar) }
 END   { 1 while unlink @files }
 
diff --git a/ext/FileCache/t/06export.t b/ext/FileCache/t/06export.t
index 0fafe3bcd6..9a46e2bebb 100644
--- a/ext/FileCache/t/06export.t
+++ b/ext/FileCache/t/06export.t
@@ -1,5 +1,5 @@
 #!./perl
-use vars qw(@funcs $i);
+our (@funcs, $i);
 
 BEGIN {
     # Functions exported by FileCache;
diff --git a/ext/Hash-Util-FieldHash/t/12_hashwarn.t b/ext/Hash-Util-FieldHash/t/12_hashwarn.t
index 5841c80046..3fd6bfd2dd 100644
--- a/ext/Hash-Util-FieldHash/t/12_hashwarn.t
+++ b/ext/Hash-Util-FieldHash/t/12_hashwarn.t
@@ -7,8 +7,7 @@ use strict;
 use warnings;
 use Hash::Util::FieldHash qw( :all);
 
-use vars qw{ @warnings };
-
+our @warnings;
 BEGIN {
     $SIG{'__WARN__'} = sub { push @warnings, @_ };
     $| = 1;
diff --git a/ext/POSIX/t/sigaction.t b/ext/POSIX/t/sigaction.t
index 99bbb9f531..2689f34c0e 100644
--- a/ext/POSIX/t/sigaction.t
+++ b/ext/POSIX/t/sigaction.t
@@ -14,7 +14,7 @@ BEGIN{
 use Test::More tests => 36;
 
 use strict;
-use vars qw/$bad $bad7 $ok10 $bad18 $ok/;
+our ( $bad, $bad7, $ok10, $bad18, $ok );
 
 $^W=1;
 
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm
index 5b3463687b..1972a8c2d3 100644
--- a/ext/Pod-Html/lib/Pod/Html.pm
+++ b/ext/Pod-Html/lib/Pod/Html.pm
@@ -2,11 +2,10 @@ package Pod::Html;
 use strict;
 require Exporter;
 
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = 1.2202;
-@ISA = qw(Exporter);
-@EXPORT = qw(pod2html htmlify);
-@EXPORT_OK = qw(anchorify);
+our $VERSION = 1.2203;
+our @ISA = qw(Exporter);
+our @EXPORT = qw(pod2html htmlify);
+our @EXPORT_OK = qw(anchorify);
 
 use Carp;
 use Config;
diff --git a/ext/VMS-DCLsym/DCLsym.pm b/ext/VMS-DCLsym/DCLsym.pm
index 6990e2af5a..b00b7bc765 100644
--- a/ext/VMS-DCLsym/DCLsym.pm
+++ b/ext/VMS-DCLsym/DCLsym.pm
@@ -2,12 +2,11 @@ package VMS::DCLsym;
 
 use Carp;
 use DynaLoader;
-use vars qw( @ISA $VERSION );
 use strict;
 
 # Package globals
-@ISA = ( 'DynaLoader' );
-$VERSION = '1.08';
+our @ISA = ( 'DynaLoader' );
+our $VERSION = '1.09';
 my(%Locsyms) = ( ':ID' => 'LOCAL' );
 my(%Gblsyms) = ( ':ID' => 'GLOBAL');
 my $DoCache = 1;
diff --git a/ext/VMS-Stdio/Stdio.pm b/ext/VMS-Stdio/Stdio.pm
index f9ed211d3b..69871fe098 100644
--- a/ext/VMS-Stdio/Stdio.pm
+++ b/ext/VMS-Stdio/Stdio.pm
@@ -8,18 +8,17 @@
 package VMS::Stdio;
 
 require 5.002;
-use vars qw( $VERSION @EXPORT @EXPORT_OK %EXPORT_TAGS @ISA );
 use Carp '&croak';
 use DynaLoader ();
 use Exporter ();
  
-$VERSION = '2.42';
-@ISA = qw( Exporter DynaLoader IO::File );
-@EXPORT = qw( &O_APPEND &O_CREAT &O_EXCL  &O_NDELAY &O_NOWAIT
+our $VERSION = '2.42';
+our @ISA = qw( Exporter DynaLoader IO::File );
+our @EXPORT = qw( &O_APPEND &O_CREAT &O_EXCL  &O_NDELAY &O_NOWAIT
               &O_RDONLY &O_RDWR  &O_TRUNC &O_WRONLY );
-@EXPORT_OK = qw( &binmode &flush &getname &remove &rewind &sync &setdef &tmpnam
+our @EXPORT_OK = qw( &binmode &flush &getname &remove &rewind &sync &setdef &tmpnam
                  &vmsopen &vmssysopen &waitfh &writeof );
-%EXPORT_TAGS = ( CONSTANTS => [ qw( &O_APPEND &O_CREAT &O_EXCL  &O_NDELAY
+our %EXPORT_TAGS = ( CONSTANTS => [ qw( &O_APPEND &O_CREAT &O_EXCL  &O_NDELAY
                                     &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC
                                     &O_WRONLY ) ],
                  FUNCTIONS => [ qw( &binmode &flush &getname &remove &rewind
diff --git a/ext/XS-APItest/t/autoload.t b/ext/XS-APItest/t/autoload.t
index bb670e91b6..b3599b362c 100644
--- a/ext/XS-APItest/t/autoload.t
+++ b/ext/XS-APItest/t/autoload.t
@@ -80,12 +80,12 @@ is join(" ", eval 'a "b", "c"'), '$',
 ok(XS::APItest::AUTOLOADtest->can('AUTOLOAD'), 'Test class ->can AUTOLOAD');
 
 # Used to communicate from the XS AUTOLOAD to Perl land
-use vars '$the_method';
+our $the_method;
 
 # First, set up the Perl equivalent to what we're testing in
 # XS so we have a comparison
 package PerlBase;
-use vars '$AUTOLOAD';
+our $AUTOLOAD;
 sub AUTOLOAD {
   Test::More::ok(defined $AUTOLOAD);
   return 1 if not defined $AUTOLOAD;
@@ -94,12 +94,10 @@ sub AUTOLOAD {
 }
 
 package PerlDerived;
-use vars '@ISA';
-@ISA = qw(PerlBase);
+our @ISA = qw(PerlBase);
 
 package Derived;
-use vars '@ISA';
-@ISA = qw(XS::APItest::AUTOLOADtest);
+our @ISA = qw(XS::APItest::AUTOLOADtest);
 
 package main;
 
diff --git a/ext/XS-APItest/t/xsub_h.t b/ext/XS-APItest/t/xsub_h.t
index e763130525..a7e2541e42 100644
--- a/ext/XS-APItest/t/xsub_h.t
+++ b/ext/XS-APItest/t/xsub_h.t
@@ -5,7 +5,7 @@ use Test::More;
 
 BEGIN { use_ok('XS::APItest') };
 
-use vars qw($XS_VERSION $VERSION);
+our ($XS_VERSION, $VERSION);
 
 # This is what the code expects
 my $real_version = $XS::APItest::VERSION;
diff --git a/ext/XS-Typemap/Typemap.pm b/ext/XS-Typemap/Typemap.pm
index 7877b4a3ab..9871415319 100644
--- a/ext/XS-Typemap/Typemap.pm
+++ b/ext/XS-Typemap/Typemap.pm
@@ -34,11 +34,9 @@ to the test script.
 use parent qw/ Exporter /;
 require XSLoader;
 
-use vars qw/ $VERSION @EXPORT /;
+our $VERSION = '0.16';
 
-$VERSION = '0.15';
-
-@EXPORT = (qw/
+our @EXPORT = (qw/
 	   T_SV
 	   T_SVREF
 	   T_SVREF_REFCOUNT_FIXED
-- 
2.14.1

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

From @atoomic

0004-Replace-multiple-use-vars-by-our-in-utils.patch
From 86563b4c619771e0d5fa4a2b08302f66eb80596c Mon Sep 17 00:00:00 2001
From: Nicolas R <atoomic@cpan.org>
Date: Tue, 12 Sep 2017 13:20:25 -0600
Subject: [PATCH 4/5] Replace multiple 'use vars' by 'our' in utils

Using vars pragma is discouraged and has been superseded
by 'our' declarations available in Perl v5.6.0 or later.
---
 Porting/Maintainers.pm | 9 ++++-----
 Porting/pod_rules.pl   | 2 +-
 configpm               | 6 +++---
 installhtml            | 2 +-
 installman             | 2 +-
 installperl            | 4 ++--
 pod/buildtoc           | 2 +-
 7 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/Porting/Maintainers.pm b/Porting/Maintainers.pm
index 1c52829f32..20ed4f7055 100644
--- a/Porting/Maintainers.pm
+++ b/Porting/Maintainers.pm
@@ -13,16 +13,15 @@ use lib "Porting";
 use 5.008;
 
 require "Maintainers.pl";
-use vars qw(%Modules %Maintainers);
+our (%Modules, %Maintainers);
 
-use vars qw(@ISA @EXPORT_OK $VERSION);
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(%Modules %Maintainers
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(%Modules %Maintainers
 		get_module_files get_module_pat
 		show_results process_options files_to_modules
 		finish_tap_output
 		reload_manifest);
-$VERSION = 0.12;
+our $VERSION = 0.13;
 
 require Exporter;
 
diff --git a/Porting/pod_rules.pl b/Porting/pod_rules.pl
index 7bf1380077..2ba023ba7c 100644
--- a/Porting/pod_rules.pl
+++ b/Porting/pod_rules.pl
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use vars qw(%Build %Targets $Verbose $Test);
+our (%Build, %Targets, $Verbose, $Test);
 use Text::Tabs;
 use Text::Wrap;
 use Getopt::Long;
diff --git a/configpm b/configpm
index 877bff1f30..89dde372d7 100755
--- a/configpm
+++ b/configpm
@@ -35,7 +35,7 @@ usage: $0  [ options ]
 EOF
 
 use strict;
-use vars qw(%Config $Config_SH_expanded);
+our (%Config, $Config_SH_expanded);
 
 my $how_many_common = 22;
 
@@ -155,7 +155,7 @@ $config_txt .= sprintf << 'EOT', $], $export_funcs;
 package Config;
 use strict;
 use warnings;
-use vars '%%Config', '$VERSION';
+our ( %%Config, $VERSION );
 
 $VERSION = "%s";
 
@@ -453,7 +453,7 @@ $heavy_txt .= sprintf <<'ENDOFBEG', $osname, $osname, $from, $osname, $env_cygwi
 package Config;
 use strict;
 use warnings;
-use vars '%%Config';
+our %%Config;
 
 sub bincompat_options {
     return split ' ', (Internals::V())[0];
diff --git a/installhtml b/installhtml
index 1094c6a6f0..1b724c0c41 100644
--- a/installhtml
+++ b/installhtml
@@ -164,7 +164,7 @@ usage("") unless @ARGV;
 # See vms/descrip_mms.template -> descrip.mms for invocation.
 if ( $^O eq 'VMS' ) { @ARGV = split(/\s+/,$ARGV[0]); }
 
-use vars qw( %Options );
+our %Options;
 
 # parse the command-line
 my $result = GetOptions( \%Options, qw(
diff --git a/installman b/installman
index 53117ab575..0bd435ffa4 100755
--- a/installman
+++ b/installman
@@ -13,7 +13,7 @@ use strict;
 use Getopt::Long;
 use ExtUtils::Packlist;
 use Pod::Man;
-use vars qw(%opts $packlist);
+our ( %opts, $packlist );
 
 require './Porting/pod_lib.pl';
 my %man1 = (map {($_->[0], $_->[1])} @{get_pod_metadata()->{master}});
diff --git a/installperl b/installperl
index af61203e72..3bf79d2d6f 100755
--- a/installperl
+++ b/installperl
@@ -11,8 +11,8 @@ BEGIN {
 }
 
 use strict;
-use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare $Is_AmigaOS
-	    %opts $packlist);
+our ($Is_VMS, $Is_W32, $Is_OS2, $Is_Cygwin, $Is_Darwin, $Is_NetWare, $Is_AmigaOS,
+	    %opts, $packlist);
 my $versiononly;
 
 BEGIN {
diff --git a/pod/buildtoc b/pod/buildtoc
index 8837f8e388..6011a02751 100644
--- a/pod/buildtoc
+++ b/pod/buildtoc
@@ -1,12 +1,12 @@
 #!/usr/bin/perl -w
 
 use strict;
-use vars qw($Quiet);
 use File::Spec;
 use FindBin;
 use Text::Wrap;
 use Getopt::Long;
 
+our $Quiet;
 no locale;
 
 # Assumption is that we're either already being run from the top level (*nix,
-- 
2.14.1

@p5pRT
Copy link
Author

p5pRT commented Sep 13, 2017

@p5pRT
Copy link
Author

p5pRT commented Nov 2, 2017

From @toddr

As I understand things, dropping support for perl 5.6 in dist isn't an issue and that was the only concern brought up relevant to this merge.

Barring any additional concerns with the removal of use vars from core directories, we're going to merge this on Monday.

Thanks,
Todd

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2017

From @toddr

This has been merged with d8f3f63

@p5pRT
Copy link
Author

p5pRT commented Nov 13, 2017

@toddr - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2018

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release yesterday of Perl 5.28.0, this and 185 other issues have been
resolved.

Perl 5.28.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.28.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT p5pRT closed this as completed Jun 23, 2018
@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2018

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant