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';
}
-eval "use Hash::Util::FieldHash";
-if ($@) {
- plan skip_all => 'Hash::Util::FieldHash required for testing uvar interaction';
-} else {
- plan tests => 2 * 5 + 7 + 1;
- defined and diag "Using Hash::Util::FieldHash $_"
+{
+ local $@;
+ if (eval { require Hash::Util::FieldHash; 1 }) {
+ plan tests => 2 * 5 + 7 + 1;
+ defined and diag "Using Hash::Util::FieldHash $_"
for $Hash::Util::FieldHash::VERSION;
+ } else {
+ plan skip_all => 'Hash::Util::FieldHash required for testing uvar interaction'
+ }
}
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';