diff options
author | Nicolas R <atoomic@cpan.org> | 2017-09-12 13:20:25 -0600 |
---|---|---|
committer | Todd Rinaldo <toddr@cpan.org> | 2017-11-11 01:07:18 -0600 |
commit | 1a58b39af83e11fcbeef7ae4cd90c565b1f6b8cb (patch) | |
tree | 542b8e3ec768e2b3a533354d694d53c6c161e8e5 /dist/SelfLoader/lib | |
parent | 33394adc9b131beee7dbbaf29bc7e8e02900f654 (diff) | |
download | perl-1a58b39af83e11fcbeef7ae4cd90c565b1f6b8cb.tar.gz |
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
Diffstat (limited to 'dist/SelfLoader/lib')
-rw-r--r-- | dist/SelfLoader/lib/SelfLoader.pm | 4 |
1 files changed, 2 insertions, 2 deletions
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'; |