summaryrefslogtreecommitdiff
path: root/dist/constant
diff options
context:
space:
mode:
authorNicolas R <atoomic@cpan.org>2017-09-12 13:20:25 -0600
committerTodd Rinaldo <toddr@cpan.org>2017-11-11 01:07:18 -0600
commit1a58b39af83e11fcbeef7ae4cd90c565b1f6b8cb (patch)
tree542b8e3ec768e2b3a533354d694d53c6c161e8e5 /dist/constant
parent33394adc9b131beee7dbbaf29bc7e8e02900f654 (diff)
downloadperl-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/constant')
-rw-r--r--dist/constant/t/constant.t2
1 files changed, 1 insertions, 1 deletions
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, @_ }
}