summaryrefslogtreecommitdiff
path: root/ext/B
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
commitfd55ca4fb1e49bf9880aad1e3d9f27ace56ec139 (patch)
treeee4fe8e8ccd3cdef389b201a64b9863d2fcf3363 /ext/B
parentcc01160e81924fc81416f1a69e0c7c52f7c1bcf7 (diff)
downloadperl-fd55ca4fb1e49bf9880aad1e3d9f27ace56ec139.tar.gz
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.
Diffstat (limited to 'ext/B')
-rw-r--r--ext/B/t/OptreeCheck.pm2
-rw-r--r--ext/B/t/b.t7
-rw-r--r--ext/B/t/terse.t2
3 files changed, 5 insertions, 6 deletions
diff --git a/ext/B/t/OptreeCheck.pm b/ext/B/t/OptreeCheck.pm
index b1d23ce0ea..fb215c227b 100644
--- a/ext/B/t/OptreeCheck.pm
+++ b/ext/B/t/OptreeCheck.pm
@@ -2,7 +2,7 @@ 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.16';
diff --git a/ext/B/t/b.t b/ext/B/t/b.t
index 587c8e665f..c976793e29 100644
--- a/ext/B/t/b.t
+++ b/ext/B/t/b.t
@@ -21,7 +21,7 @@ BEGIN { use_ok( 'B' ); }
package Testing::Symtable;
-use vars qw($This @That %wibble $moo %moo);
+our ($This, @That, %wibble, $moo, %moo);
my $not_a_sym = 'moo';
sub moo { 42 }
@@ -35,7 +35,7 @@ package Testing::Symtable::Bar;
sub hock { "yarrow" }
package main;
-use vars qw(%Subs);
+our %Subs;
local %Subs = ();
B::walksymtable(\%Testing::Symtable::, 'find_syms', sub { $_[0] =~ /Foo/ },
'Testing::Symtable::');
@@ -46,8 +46,7 @@ sub B::GV::find_syms {
$main::Subs{$symbol->STASH->NAME . '::' . $symbol->NAME}++;
}
-my @syms = map { 'Testing::Symtable::'.$_ } qw(This That wibble moo car
- BEGIN);
+my @syms = map { 'Testing::Symtable::'.$_ } qw(This That wibble moo car);
push @syms, "Testing::Symtable::Foo::yarrow";
# Make sure we hit all the expected symbols.
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);