BEGIN {
eval { require Config };
die 'OS unsupported' if $@;
- Config->import(qw/%Config/);
+ Config->import(qw<%Config>);
}
my @DEFINES;
my $is_gcc_34 = 0;
print "Checking if this is gcc 3.4 on Windows trying to link against an import library... ";
if ($^O eq 'MSWin32' and not grep /^LD[A-Z]*=/, @ARGV) {
- my ($libperl, $gccversion) = map $_ || '', @Config{qw/libperl gccversion/};
+ my ($libperl, $gccversion) = map $_ || '', @Config{qw<libperl gccversion>};
if ($gccversion =~ /^3\.4\.[0-9]+/ and $libperl =~ s/\.lib$//) {
$is_gcc_34 = 1;
- my ($lddlflags, $ldflags) = @Config{qw/lddlflags ldflags/};
+ my ($lddlflags, $ldflags) = @Config{qw<lddlflags ldflags>};
$_ ||= '', s/-L(?:".*?"|\S+)//g for $lddlflags, $ldflags;
$libperl = "-l$libperl";
my $libdirs = join ' ',
map { s/(?<!\\)((?:\\\\)*")/\\$1/g; qq[-L"$_"] }
- @Config{qw/bin sitebin/};
+ @Config{qw<bin sitebin>};
$macro{LDDLFLAGS} = "$lddlflags $libdirs $libperl";
$macro{LDFLAGS} = "$ldflags $libdirs $libperl";
$macro{PERL_ARCHIVE} = '',
=head1 SYNOPSIS
- use Variable::Magic qw/wizard cast VMG_OP_INFO_NAME/;
+ use Variable::Magic qw<wizard cast VMG_OP_INFO_NAME>;
{ # A variable tracer
my $wiz = wizard set => sub { print "now set to ${$_[0]}!\n" },
my %opts = @_;
- my @keys = qw/data op_info get set len clear free/;
+ my @keys = qw<data op_info get set len clear free>;
push @keys, 'copy' if MGf_COPY;
push @keys, 'dup' if MGf_DUP;
push @keys, 'local' if MGf_LOCAL;
- push @keys, qw/fetch store exists delete copy_key/ if VMG_UVAR;
+ push @keys, qw<fetch store exists delete copy_key> if VMG_UVAR;
my ($wiz, $err);
{
{
package Magical::UserData;
- use Variable::Magic qw/wizard cast getdata/;
+ use Variable::Magic qw<wizard cast getdata>;
my $wiz = wizard data => sub { \$_[1] };
=cut
-use base qw/Exporter/;
+use base qw<Exporter>;
our @EXPORT = ();
our %EXPORT_TAGS = (
- 'funcs' => [ qw/wizard cast getdata dispell/ ],
- 'consts' => [ qw/
+ 'funcs' => [ qw<wizard cast getdata dispell> ],
+ 'consts' => [ qw<
MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR
VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID
VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID
VMG_PERL_PATCHLEVEL
VMG_THREADSAFE VMG_FORKSAFE
VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT
- / ],
+ > ],
);
our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
$EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
use strict;
use warnings;
-use lib qw{blib/arch blib/lib};
-use Variable::Magic qw/wizard cast/;
+use lib qw<blib/arch blib/lib>;
+use Variable::Magic qw<wizard cast>;
use Tie::Hash;
my $wiz = wizard copy => sub { print STDERR "COPY $_[2] => $_[3]\n" },
use strict;
use warnings;
-use lib qw{blib/arch blib/lib};
-use Variable::Magic qw/wizard cast dispell/;
+use lib qw<blib/arch blib/lib>;
+use Variable::Magic qw<wizard cast dispell>;
sub foo { print STDERR "got ${$_[0]}!\n" }
my $bar = sub { ++${$_[0]}; print STDERR "now set to ${$_[0]}!\n"; };
my $wiz = wizard get => \&foo,
set => $bar,
free => sub { print STDERR "deleted!\n"; };
- cast $a, $wiz, qw/a b c/;
+ cast $a, $wiz, qw<a b c>;
++$a; # "got 1!", "now set to 3!"
dispell $a, $wiz;
cast $a, $wiz;
use strict;
use warnings;
-use Variable::Magic qw/wizard cast VMG_OP_INFO_NAME/;
+use Variable::Magic qw<wizard cast VMG_OP_INFO_NAME>;
{
my $wiz = wizard set => sub { print "now set to ${$_[0]}!\n" },
use strict;
use warnings;
-use lib qw{blib/arch blib/lib};
-use Variable::Magic qw/wizard cast dispell/;
+use lib qw<blib/arch blib/lib>;
+use Variable::Magic qw<wizard cast dispell>;
my $wiz = wizard
fetch => sub { print STDERR "$_[0] FETCH KEY $_[2]\n" },
use Tie::Hash;
-use lib qw{blib/arch blib/lib};
-use Variable::Magic qw/wizard cast VMG_UVAR/;
+use lib qw<blib/arch blib/lib>;
+use Variable::Magic qw<wizard cast VMG_UVAR>;
-use Benchmark qw/cmpthese/;
+use Benchmark qw<cmpthese>;
die 'Your perl does not support the nice uvar magic of 5.10.*' unless VMG_UVAR;
cast => '\[$@%&*]$@',
getdata => '\[$@%&*]$',
dispell => '\[$@%&*]$',
- map { $_ => '' } qw/
+ map { $_ => '' } qw<
MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR
VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID
VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID
VMG_PERL_PATCHLEVEL
VMG_THREADSAFE VMG_FORKSAFE
VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT
- /
+ >
);
for (sort keys %syms) {
use Test::More tests => 43;
-use Variable::Magic qw/wizard cast dispell MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR/;
+use Variable::Magic qw<wizard cast dispell MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR>;
my $inv_wiz_obj = qr/Invalid\s+wizard\s+object\s+at\s+\Q$0\E/;
use Test::More tests => 33 + 41;
-use Variable::Magic qw/wizard cast dispell VMG_UVAR/;
+use Variable::Magic qw<wizard cast dispell VMG_UVAR>;
my $n = 3;
my @w;
use Test::More tests => 35;
-use Variable::Magic qw/wizard getdata cast dispell/;
+use Variable::Magic qw<wizard getdata cast dispell>;
my $c = 1;
is($@, '', 'dispell doesn\'t croak');
ok($res, 'dispell returns true');
-$res = eval { cast $a, $wiz, qw/z j t/ };
+$res = eval { cast $a, $wiz, qw<z j t> };
is($@, '', 'cast with arguments doesn\'t croak');
ok($res, 'cast with arguments returns true');
use Test::More tests => 17;
-use Variable::Magic qw/wizard cast/;
+use Variable::Magic qw<wizard cast>;
my $wiz = eval { wizard get => sub { undef } };
is($@, '', 'wizard creation doesn\'t croak');
use Test::More tests => 17;
-use Variable::Magic qw/wizard cast dispell getdata/;
+use Variable::Magic qw<wizard cast dispell getdata>;
my $c = 0;
use Test::More;
-use Variable::Magic qw/wizard cast dispell VMG_UVAR/;
+use Variable::Magic qw<wizard cast dispell VMG_UVAR>;
if (!VMG_UVAR) {
plan skip_all => 'No nice uvar magic for this perl';
use lib 't/lib';
use Variable::Magic::TestWatcher;
-my $wiz = init_watcher [ qw/fetch store/ ], 'huf';
+my $wiz = init_watcher [ qw<fetch store> ], 'huf';
ok defined($wiz), 'huf: wizard with uvar is defined';
is ref($wiz), 'SCALAR', 'huf: wizard with uvar is a scalar ref';
use Test::More tests => 4 * 8 + 10 + 1 + 1;
-use Variable::Magic qw/wizard cast VMG_UVAR/;
+use Variable::Magic qw<wizard cast VMG_UVAR>;
sub expect {
my ($name, $where, $suffix) = @_;
skip 'No working Capture::Tiny is installed'=> $count unless $has_capture_tiny;
my $output = Capture::Tiny::capture_merged(sub { run_perl <<' CODE' });
-use Variable::Magic qw/wizard cast/; { BEGIN { $^H |= 0x020000; cast %^H, wizard free => sub { die q[cucumber] } } }
+use Variable::Magic qw<wizard cast>; { BEGIN { $^H |= 0x020000; cast %^H, wizard free => sub { die q[cucumber] } } }
CODE
skip 'Test code didn\'t run properly' => $count unless defined $output;
like $output, expect('cucumber', '-e', "\nExecution(?s:.*)"),
skip 'No working Capture::Tiny is installed'=> $count unless $has_capture_tiny;
my $output = Capture::Tiny::capture_merged(sub { run_perl <<' CODE' });
-use Variable::Magic qw/wizard cast/; BEGIN { cast %::, wizard fetch => sub { die q[salsify] } } hlagh()
+use Variable::Magic qw<wizard cast>; BEGIN { cast %::, wizard fetch => sub { die q[salsify] } } hlagh()
CODE
skip 'Test code didn\'t run properly' => $count unless defined $output;
my $suffix = "\nExecution(?s:.*)";
use Test::More tests => 17 * (3 + 4) + 5 + 1;
-use Config qw/%Config/;
+use Config qw<%Config>;
-use Variable::Magic qw/wizard cast dispell VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT/;
+use Variable::Magic qw<wizard cast dispell VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT>;
sub Variable::Magic::TestPkg::foo { }
use Test::More tests => (2 * 4 + 2) + (2 * 2) + 1;
-use Variable::Magic qw/cast/;
+use Variable::Magic qw<cast>;
use lib 't/lib';
use Variable::Magic::TestWatcher;
use Test::More tests => (2 * 5 + 3) + (2 * 2 + 1);
-use Variable::Magic qw/cast/;
+use Variable::Magic qw<cast>;
use lib 't/lib';
use Variable::Magic::TestWatcher;
use Test::More tests => 39 + (2 * 2 + 1);
-use Variable::Magic qw/wizard cast dispell VMG_COMPAT_SCALAR_LENGTH_NOLEN/;
+use Variable::Magic qw<wizard cast dispell VMG_COMPAT_SCALAR_LENGTH_NOLEN>;
use lib 't/lib';
use Variable::Magic::TestValue;
my $wiz = wizard len => sub { $d = $_[2]; ++$c; return $n };
is $c, 0, 'len: wizard() doesn\'t trigger magic';
-my @a = qw/a b c/;
+my @a = qw<a b c>;
$c = 0;
cast @a, $wiz;
use Test::More tests => (2 * 5 + 2) + (2 * 2 + 1) + 1;
-use Variable::Magic qw/cast dispell/;
+use Variable::Magic qw<cast dispell>;
use lib 't/lib';
use Variable::Magic::TestWatcher;
my $wiz = init_watcher 'clear', 'clear';
-my @a = qw/a b c/;
+my @a = qw<a b c>;
watch { cast @a, $wiz } { }, 'cast array';
use Test::More tests => 2 * 5 + 1;
-use Variable::Magic qw/cast/;
+use Variable::Magic qw<cast>;
use lib 't/lib';
use Variable::Magic::TestWatcher;
use Test::More;
-use Variable::Magic qw/cast dispell MGf_COPY/;
+use Variable::Magic qw<cast dispell MGf_COPY>;
if (MGf_COPY) {
plan tests => 2 + ((2 * 5 + 3) + (2 * 2 + 1)) + (2 * 9 + 6) + 1;
watch { my ($k, $v) = each %h } { copy => 1 }, 'tied hash each';
my @k = watch { keys %h } { }, 'tied hash keys';
- is_deeply [ sort @k ], [ qw/a c/ ], 'copy: tied hash keys correctly';
+ is_deeply [ sort @k ], [ qw<a c> ], 'copy: tied hash keys correctly';
my @v = watch { values %h } { copy => 2 }, 'tied hash values';
is_deeply [ sort { $a <=> $b } @v ], [ 1, 3 ], 'copy: tied hash values correctly';
use Test::More;
-use Variable::Magic qw/cast MGf_LOCAL/;
+use Variable::Magic qw<cast MGf_LOCAL>;
if (MGf_LOCAL) {
plan tests => 2 * 3 + 1 + 1;
use Test::More;
-use Variable::Magic qw/wizard cast dispell VMG_UVAR/;
+use Variable::Magic qw<wizard cast dispell VMG_UVAR>;
if (VMG_UVAR) {
plan tests => 2 * 15 + 12 + 14 + (4 * 2 * 2 + 1 + 1) + 1;
use Variable::Magic::TestWatcher;
use Variable::Magic::TestValue;
-my $wiz = init_watcher [ qw/fetch store exists delete/ ], 'uvar';
+my $wiz = init_watcher [ qw<fetch store exists delete> ], 'uvar';
my %h = (a => 1, b => 2, c => 3);
use strict;
use warnings;
-use Config qw/%Config/;
+use Config qw<%Config>;
use Test::More tests => (2 * 14 + 2) + 2 * (2 * 8 + 4) + 3 + 1;
-use Variable::Magic qw/wizard cast dispell MGf_COPY/;
+use Variable::Magic qw<wizard cast dispell MGf_COPY>;
use lib 't/lib';
use Variable::Magic::TestWatcher;
my $is_5130_release = ($] == 5.013 && !$Config{git_describe}) ? 1 : 0;
my $wiz = init_watcher
- [ qw/get set len clear free copy dup local fetch store exists delete/ ],
+ [ qw<get set len clear free copy dup local fetch store exists delete> ],
'scalar';
my $n = int rand 1000;
};
is $@, '', 'cast copy magic on tied array';
- watch { delete $a[0] } [ qw/get clear free/ ], 'delete from tied array';
+ watch { delete $a[0] } [ qw<get clear free> ], 'delete from tied array';
}
use Test::More tests => 2 * 27 + 13 + 1;
-use Variable::Magic qw/cast dispell VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID VMG_COMPAT_ARRAY_UNDEF_CLEAR/;
+use Variable::Magic qw<
+ cast dispell
+ VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID
+ VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID
+ VMG_COMPAT_ARRAY_UNDEF_CLEAR
+>;
use lib 't/lib';
use Variable::Magic::TestWatcher;
my $wiz = init_watcher
- [ qw/get set len clear free copy dup local fetch store exists delete/ ],
+ [ qw<get set len clear free copy dup local fetch store exists delete> ],
'array';
my @n = map { int rand 1000 } 1 .. 5;
@b = watch { @a[2 .. 4] } { }, 'slice';
is_deeply \@b, [ @n[2 .. 4] ], 'array: slice correctly';
-watch { @a = qw/a b d/ } { set => 3, clear => 1 }, 'assign';
+watch { @a = qw<a b d> } { set => 3, clear => 1 }, 'assign';
watch { $a[2] = 'c' } { }, 'assign old element';
use Test::More tests => (2 * 21 + 7) + (2 * 5 + 5) + 1;
-use Variable::Magic qw/cast dispell MGf_COPY VMG_UVAR/;
+use Variable::Magic qw<cast dispell MGf_COPY VMG_UVAR>;
use lib 't/lib';
use Variable::Magic::TestWatcher;
my $wiz = init_watcher
- [ qw/get set len clear free copy dup local fetch store exists delete/ ],
+ [ qw<get set len clear free copy dup local fetch store exists delete> ],
'hash';
-my %n = map { $_ => int rand 1000 } qw/foo bar baz qux/;
+my %n = map { $_ => int rand 1000 } qw<foo bar baz qux>;
my %h = %n;
watch { cast %h, $wiz } { }, 'cast';
$s = watch { \%h } { }, 'reference';
-my @b = watch { @h{qw/bar qux/} }
+my @b = watch { @h{qw<bar qux>} }
+{ (fetch => 2) x VMG_UVAR }, 'slice';
-is_deeply \@b, [ @n{qw/bar qux/} ], 'hash: slice correctly';
+is_deeply \@b, [ @n{qw<bar qux>} ], 'hash: slice correctly';
watch { %h = () } { clear => 1 }, 'empty in list context';
+{ (store => 2, copy => 2) x VMG_UVAR, clear => 1 },
'assign from list in void context';
-watch { %h = map { $_ => 1 } qw/a b d/; }
+watch { %h = map { $_ => 1 } qw<a b d>; }
+{ (exists => 3, store => 3, copy => 3) x VMG_UVAR, clear => 1 },
'assign from map in list context';
$s = watch { %h } { }, 'buckets';
@b = watch { keys %h } { }, 'keys';
-is_deeply [ sort @b ], [ qw/a b c d/ ], 'hash: keys correctly';
+is_deeply [ sort @b ], [ qw<a b c d> ], 'hash: keys correctly';
@b = watch { values %h } { }, 'values';
is_deeply [ sort { $a <=> $b } @b ], [ 1, 1, 2, 3 ], 'hash: values correctly';
use Test::More tests => 2 * 12 + 11 + 1;
-use Variable::Magic qw/cast dispell/;
+use Variable::Magic qw<cast dispell>;
use lib 't/lib';
use Variable::Magic::TestWatcher;
my $wiz = init_watcher
- [ qw/get set len clear free copy dup local fetch store exists delete/ ],
+ [ qw<get set len clear free copy dup local fetch store exists delete> ],
'code';
my $x = 0;
use Test::More;
-eval "use Symbol qw/gensym/";
-if ($@) {
- plan skip_all => "Symbol::gensym required for testing magic for globs";
-} else {
- plan tests => 2 * 12 + 1;
- defined and diag "Using Symbol $_" for $Symbol::VERSION;
+BEGIN {
+ local $@;
+ if (eval "use Symbol qw<gensym>; 1") {
+ plan tests => 2 * 12 + 1;
+ defined and diag "Using Symbol $_" for $Symbol::VERSION;
+ } else {
+ plan skip_all => "Symbol::gensym required for testing magic for globs";
+ }
}
-use Variable::Magic qw/cast dispell VMG_COMPAT_GLOB_GET/;
+use Variable::Magic qw<cast dispell VMG_COMPAT_GLOB_GET>;
my %get = VMG_COMPAT_GLOB_GET ? (get => 1) : ();
use Variable::Magic::TestWatcher;
my $wiz = init_watcher
- [ qw/get set len clear free copy dup local fetch store exists delete/ ],
+ [ qw<get set len clear free copy dup local fetch store exists delete> ],
'glob';
local *a = gensym();
watch { local *b = *a } +{ %get }, 'assign to';
watch { *a = \1 } +{ %get, set => 1 }, 'assign scalar slot';
-watch { *a = [ qw/x y/ ] } +{ %get, set => 1 }, 'assign array slot';
+watch { *a = [ qw<x y> ] } +{ %get, set => 1 }, 'assign array slot';
watch { *a = { u => 1 } } +{ %get, set => 1 }, 'assign hash slot';
watch { *a = sub { } } +{ %get, set => 1 }, 'assign code slot';
use Test::More;
-use Variable::Magic qw/wizard cast dispell VMG_UVAR VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT/;
+use Variable::Magic qw<
+ wizard cast dispell
+ VMG_UVAR VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT
+>;
my $run;
if (VMG_UVAR) {
()
}
CB
-} qw/fetch store exists delete/);
+} qw<fetch store exists delete>);
$code .= ', data => sub { +{ guard => 0 } }';
is $@, "ok\n", 'stash: variables compiled fine';
is_deeply \%mg, {
- fetch => [ qw/thing stuff/ ],
- store => [ qw/thing stuff/ ],
+ fetch => [ qw<thing stuff> ],
+ store => [ qw<thing stuff> ],
}, 'stash: variables';
}
is $@, "ok\n", 'stash: function definitions compiled fine';
is_deeply \%mg, {
- store => [ qw/eat shoot leave shoot/ ],
+ store => [ qw<eat shoot leave shoot> ],
}, 'stash: function definitions';
}
roam();
};
- my @calls = qw/eat shoot leave roam yawn roam/;
+ my @calls = qw<eat shoot leave roam yawn roam>;
is $@, "ok\n", 'stash: function calls compiled fine';
is_deeply \%mg, {
is $@, '', 'stash: valid method call ran fine';
is_deeply \%mg, {
- fetch => [ qw/shoot/ ],
+ fetch => [ qw<shoot> ],
}, 'stash: valid method call';
}
is $@, '', 'stash: second valid method call ran fine';
is_deeply \%mg, {
- fetch => [ qw/shoot/ ],
+ fetch => [ qw<shoot> ],
}, 'stash: second valid method call';
}
is $@, '', 'stash: valid dynamic method call ran fine';
is_deeply \%mg, {
- store => [ qw/shoot/ ],
+ store => [ qw<shoot> ],
}, 'stash: valid dynamic method call';
}
is $@, '', 'inherited valid method call ran fine';
is_deeply \%mg, {
- fetch => [ qw/ISA leave/ ],
+ fetch => [ qw<ISA leave> ],
}, 'stash: inherited valid method call';
}
is $@, '', 'inherited previously called valid method call ran fine';
is_deeply \%mg, {
- fetch => [ qw/shoot/ ],
+ fetch => [ qw<shoot> ],
}, 'stash: inherited previously called valid method call';
}
like $@, qr/^Can't locate object method "unknown" via package "Hlagh"/, 'stash: invalid method call croaked';
is_deeply \%mg, {
- fetch => [ qw/unknown/ ],
- store => [ qw/unknown AUTOLOAD/ ],
+ fetch => [ qw<unknown> ],
+ store => [ qw<unknown AUTOLOAD> ],
}, 'stash: invalid method call';
}
like $@, qr/^Can't locate object method "unknown_too" via package "Hlagh"/, 'stash: invalid dynamic method call croaked';
is_deeply \%mg, {
- store => [ qw/unknown_too AUTOLOAD/ ],
+ store => [ qw<unknown_too AUTOLOAD> ],
}, 'stash: invalid dynamic method call';
}
like $@, qr/^Can't locate object method "also_unknown" via package "Hlagher"/, 'stash: invalid inherited method call croaked';
is_deeply \%mg, {
- fetch => [ qw/also_unknown AUTOLOAD/ ],
+ fetch => [ qw<also_unknown AUTOLOAD> ],
}, 'stash: invalid method call';
}
is $@, '', 'stash: delete executed fine';
is_deeply \%mg, {
store => [
- qw/nevermentioned nevermentioned eat eat shoot shoot nevermentioned/
+ qw<nevermentioned nevermentioned eat eat shoot shoot nevermentioned>
],
}, 'stash: delete';
}
{
package AutoHlagh;
- use vars qw/$AUTOLOAD/;
+ use vars qw<$AUTOLOAD>;
sub AUTOLOAD { return $AUTOLOAD }
}
is $res, 'AutoHlagh::autoloaded',
'stash: autoloaded method call returned the right thing';
is_deeply \%mg, {
- fetch => [ qw/autoloaded/ ],
- store => [ qw/autoloaded AUTOLOAD AUTOLOAD/ ],
+ fetch => [ qw<autoloaded> ],
+ store => [ qw<autoloaded AUTOLOAD AUTOLOAD> ],
}, 'stash: autoloaded method call';
}
is $res, 'AutoHlagher::also_autoloaded',
'stash: inherited autoloaded method returned the right thing';
is_deeply \%mg, {
- fetch => [ qw/also_autoloaded AUTOLOAD/ ],
- store => [ qw/AUTOLOAD/ ],
+ fetch => [ qw<also_autoloaded AUTOLOAD> ],
+ store => [ qw<AUTOLOAD> ],
}, 'stash: inherited autoloaded method call';
}
()
}
CB
-} qw/fetch store exists delete/);
+} qw<fetch store exists delete>);
my $uo_exp = $] < 5.011002 ? 2 : 3;
Test::More::plan(skip_all => $msg);
}
-use Config qw/%Config/;
+use Config qw<%Config>;
BEGIN {
my $force = $ENV{PERL_VARIABLE_MAGIC_TEST_THREADS} ? 1 : !1;
use Test::More; # after threads
-use Variable::Magic qw/wizard cast dispell getdata VMG_THREADSAFE VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT/;
+use Variable::Magic qw<
+ wizard cast dispell getdata
+ VMG_THREADSAFE VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT
+>;
BEGIN {
skipall 'This Variable::Magic isn\'t thread safe' unless VMG_THREADSAFE;
Test::More::plan(skip_all => $msg);
}
-use Config qw/%Config/;
+use Config qw<%Config>;
BEGIN {
my $force = $ENV{PERL_VARIABLE_MAGIC_TEST_THREADS} ? 1 : !1;
use Test::More; # after threads
-use Variable::Magic qw/wizard cast dispell getdata VMG_THREADSAFE VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT/;
+use Variable::Magic qw<
+ wizard cast dispell getdata
+ VMG_THREADSAFE VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT
+>;
BEGIN {
skipall 'This Variable::Magic isn\'t thread safe' unless VMG_THREADSAFE;
use Test::More tests => 11;
-use Variable::Magic qw/wizard cast getdata/;
+use Variable::Magic qw<wizard cast getdata>;
our $destroyed;
use Test::More;
-use Variable::Magic qw/wizard cast/;
+use Variable::Magic qw<wizard cast>;
my $wiz;
use Test::More;
-use Variable::Magic qw/wizard cast/;
+use Variable::Magic qw<wizard cast>;
-use base qw/Exporter/;
+use base qw<Exporter>;
-our @EXPORT = qw/init_value value/;
+our @EXPORT = qw<init_value value>;
our ($exp, $prefix, $desc);
use Test::More;
-use Carp qw/croak/;
-use Variable::Magic qw/wizard/;
+use Carp qw<croak>;
+use Variable::Magic qw<wizard>;
-use base qw/Exporter/;
+use base qw<Exporter>;
-our @EXPORT = qw/init_watcher watch/;
+our @EXPORT = qw<init_watcher watch>;
sub _types {
my $t = shift;