plan skip_all => 'Hash::Util::FieldHash required for testing uvar interaction';
} else {
plan tests => 2 * 5 + 7 + 1;
- my $v = $Hash::Util::FieldHash::VERSION;
- diag "Using Hash::Util::FieldHash $v" if defined $v;
+ defined and diag "Using Hash::Util::FieldHash $_"
+ for $Hash::Util::FieldHash::VERSION;
}
use lib 't/lib';
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);
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);
SKIP: {
eval "use Tie::Hash";
skip 'Tie::Hash required to test uvar magic on tied hashes' => 2 * 5 + 4 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 = (x => 7, y => 8);
}
skip $SKIP => 3 if $SKIP;
- 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[0] = $$;
plan skip_all => "Symbol::gensym required for testing magic for globs";
} else {
plan tests => 2 * 12 + 1;
- diag "Using Symbol $Symbol::VERSION" if defined $Symbol::VERSION;
+ defined and diag "Using Symbol $_" for $Symbol::VERSION;
}
use Variable::Magic qw/cast dispell VMG_COMPAT_GLOB_GET/;
BEGIN {
skipall 'This Variable::Magic isn\'t thread safe' unless VMG_THREADSAFE;
plan tests => (4 * 18 + 1) + (4 * 13 + 1);
- my $v = $threads::VERSION;
- diag "Using threads $v" if defined $v;
- $v = $threads::shared::VERSION;
- diag "Using threads::shared $v" if defined $v;
+ defined and diag "Using threads $_" for $threads::VERSION;
+ defined and diag "Using threads::shared $_" for $threads::shared::VERSION;
}
my $destroyed : shared = 0;
BEGIN {
skipall 'This Variable::Magic isn\'t thread safe' unless VMG_THREADSAFE;
plan tests => 2 * 3 + 2 * (2 * 10 + 2) + 2 * (2 * 7 + 2);
- my $v = $threads::VERSION;
- diag "Using threads $v" if defined $v;
- $v = $threads::shared::VERSION;
- diag "Using threads::shared $v" if defined $v;
+ defined and diag "Using threads $_" for $threads::VERSION;
+ defined and diag "Using threads::shared $_" for $threads::shared::VERSION;
}
my $destroyed : shared = 0;