5 use 5.008000; # for ${^TAINT}
6 use Test::More tests => 2;
10 # stolen liberally from Class-Tiny/t/lib/TestUtils.pm - thanks xdg!
13 my $success = eval { $code->(); 1 };
15 return undef if $success; # original returned ''
16 croak "Execution died, but the error was lost" unless $@;
20 ok(${^TAINT}, 'taint flag is set');
22 # without the fix, we get:
23 # Insecure dependency in eval while running with -T switch at lib/Module/Metadata.pm line 668, <GEN0> line 15.
25 exception { Module::Metadata->new_from_module( "Module::Metadata" )->version },