]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/32-hash.t
Switch to qw<>
[perl/modules/Variable-Magic.git] / t / 32-hash.t
index 0ad2e96413adb937e21f6d1d6bb8acb3b7f44c4c..1bbd3001e800f665d558272dc8d4c88591b36605 100644 (file)
@@ -5,16 +5,16 @@ use warnings;
 
 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';
@@ -34,9 +34,9 @@ is_deeply \%b, \%n, 'hash: assign to correctly';
 
 $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';
 
@@ -44,7 +44,7 @@ watch { %h = (a => 1, d => 3); () }
                +{ (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';
 
@@ -57,7 +57,7 @@ watch { $h{c} = 3; () } +{ (store => 1, copy => 1) x VMG_UVAR },
 $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';