- 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;
+ my $has_tie_hash = do { local $@; eval { require Tie::Hash; 1 } };
+ skip 'Tie::Hash required to test copy magic on hashes'
+ => 2 * 9 + 6 unless $has_tie_hash;
+ defined and diag "Using Tie::Hash $_" for $Tie::Hash::VERSION;