X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2Flib%2FScope%2FUpper%2FTestGenerator.pm;h=99764d5618f3fad75c3198f9206d31d0c065b36c;hb=f3c40d6f05f68f105430a219355dc4bd2979f3fe;hp=af267870189e2a2f629a12d89c42266b8e6f3839;hpb=25ca578b6394c6506d811fe8f0dd976ba4c71b7f;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/lib/Scope/Upper/TestGenerator.pm b/t/lib/Scope/Upper/TestGenerator.pm index af26787..99764d5 100644 --- a/t/lib/Scope/Upper/TestGenerator.pm +++ b/t/lib/Scope/Upper/TestGenerator.pm @@ -25,6 +25,14 @@ my @blocks = ( [ 'eval q[', '];' ], ); +sub import { + if ($] >= 5.010001) { + push @blocks, [ 'given (1) { my $_;', '}' ]; + require feature; + feature->import('switch'); + } +} + @blocks = map [ map "$_\n", @$_ ], @blocks; sub _block {