X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F25-copy.t;h=a18022f057488ca669b7375f790fe95387dc2bcd;hb=refs%2Ftags%2Fv0.46;hp=98fbf22d3fcdf378e417ee675e031393dd9b0a1c;hpb=b9df7824d4619174e28f9b1b5856c4a228d9cc7b;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/25-copy.t b/t/25-copy.t index 98fbf22..a18022f 100644 --- a/t/25-copy.t +++ b/t/25-copy.t @@ -5,7 +5,7 @@ use warnings; use Test::More; -use Variable::Magic qw/cast dispell MGf_COPY/; +use Variable::Magic qw; if (MGf_COPY) { plan tests => 2 + ((2 * 5 + 3) + (2 * 2 + 1)) + (2 * 9 + 6) + 1; @@ -23,7 +23,7 @@ SKIP: { eval "use Tie::Array"; skip 'Tie::Array required to test copy magic on arrays' => (2 * 5 + 3) + (2 * 2 + 1) if $@; - diag "Using Tie::Array $Tie::Array::VERSION" if defined $Tie::Array::VERSION; + defined and diag "Using Tie::Array $_" for $Tie::Array::VERSION; tie my @a, 'Tie::StdArray'; @a = (1 .. 10); @@ -57,7 +57,7 @@ SKIP: { SKIP: { eval "use Tie::Hash"; skip 'Tie::Hash required to test copy magic on hashes' => 2 * 9 + 6 if $@; - diag "Using Tie::Hash $Tie::Hash::VERSION" if defined $Tie::Hash::VERSION; + defined and diag "Using Tie::Hash $_" for $Tie::Hash::VERSION; tie my %h, 'Tie::StdHash'; %h = (a => 1, b => 2, c => 3); @@ -79,7 +79,7 @@ SKIP: { 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 ], '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';