X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=t%2Flib%2FVPIT%2FTestHelpers.pm;h=aeabc166c72663b1e1c7e926591e3b89d4f5de0b;hp=10550eec28c139e43612a455205230900984c994;hb=ad7f92aa119dd23a7a81581adb2628ffa8102357;hpb=3b0b8496006f89abcccdcc5f0322fed266e8ed53 diff --git a/t/lib/VPIT/TestHelpers.pm b/t/lib/VPIT/TestHelpers.pm index 10550ee..aeabc16 100644 --- a/t/lib/VPIT/TestHelpers.pm +++ b/t/lib/VPIT/TestHelpers.pm @@ -97,7 +97,9 @@ my $test_sub = sub { } my $glob = $stash->{$sub}; - return $glob ? *$glob{CODE} : undef; + return ref \$glob eq 'GLOB' ? *$glob{CODE} + : ref $glob eq 'CODE' ? $glob + : undef; }; sub skip { $test_sub->('skip')->(@_) } @@ -835,11 +837,11 @@ sub DESTROY { $_[0]->{code}->() } =head1 AUTHOR -Vincent Pit, C<< >>, L. +Vincent Pit C<< >>. =head1 COPYRIGHT & LICENSE -Copyright 2012,2013,2014,2015 Vincent Pit, all rights reserved. +Copyright 2012,2013,2014,2015,2019 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.