X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=blobdiff_plain;f=t%2F17-ctl.t;h=2500a9454f1fe2e035e9487ac67a3ec5131d6493;hp=2adf60de8a858301b17a5fe621cb35163e1d906b;hb=bf312200eadacf72b88d138784777e8a9c7be40c;hpb=d86c036207e622521bd725d7be7829d55ffd71f3 diff --git a/t/17-ctl.t b/t/17-ctl.t index 2adf60d..2500a94 100644 --- a/t/17-ctl.t +++ b/t/17-ctl.t @@ -226,13 +226,19 @@ sub run_perl { my $has_capture_tiny = do { local $@; - eval 'use Capture::Tiny 0.08 (); 1' + eval { + require Capture::Tiny; + Capture::Tiny->VERSION('0.08'); + } }; if ($has_capture_tiny) { - my $output = Capture::Tiny::capture_merged(sub { run_perl <<' CODE' }); + local $@; + my $output = eval { + Capture::Tiny::capture_merged(sub { run_perl <<' CODE' }); print STDOUT "pants\n"; print STDERR "trousers\n"; - CODE + CODE + }; unless (defined $output and $output =~ /pants/ and $output =~ /trousers/) { $has_capture_tiny = 0; }