use Test::More;
+use lib 't/lib';
+use VPIT::TestHelpers;
+
BEGIN {
- plan skip_all => 'Variable::Magic required to test magic'
- unless eval "use Variable::Magic; 1";
+ load_or_skip_all('Variable::Magic', undef, [ ]);
}
{
package Lexical::Types::Test::Str;
- use Variable::Magic qw/wizard cast/;
+ use Variable::Magic qw<wizard cast>;
our $wiz;
BEGIN {
get => sub { ++$_[1]->{get}; () },
set => sub { ++$_[1]->{set}; () };
}
-
+
sub TYPEDSCALAR { cast $_[1], $wiz, $_[2]; () }
}
my $want = wantarray;
my @ret;
{
- local @{$got}{qw/get set/}; delete @{$got}{qw/get set/};
+ local @{$got}{qw<get set>};
+ delete @{$got}{qw<get set>};
if ($want) {
@ret = eval { $test->() };
} elsif (defined $want) {
} else {
eval { $test->() };
}
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
is_deeply $got, $exp, $desc;
}
return $want ? @ret : $ret[0];