From: Vincent Pit Date: Sun, 24 Jun 2012 22:50:26 +0000 (+0200) Subject: Don't use the main:: stash in the last test of t/17-ctl.t X-Git-Tag: rt77991^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=d86c036207e622521bd725d7be7829d55ffd71f3 Don't use the main:: stash in the last test of t/17-ctl.t As it is less subject to extra lookups. This fixes RT #77991 in a better way. --- diff --git a/t/17-ctl.t b/t/17-ctl.t index 4235938..2adf60d 100644 --- a/t/17-ctl.t +++ b/t/17-ctl.t @@ -266,10 +266,10 @@ SKIP: skip 'No working Capture::Tiny is installed'=> $count unless $has_capture_tiny; my $output = Capture::Tiny::capture_merged(sub { run_perl <<' CODE' }); -use Variable::Magic qw; BEGIN { cast %::, wizard fetch => sub { die q[raddish] } } hlagh() +use Variable::Magic qw; BEGIN { cast %derp::, wizard fetch => sub { die q[raddish] } } derp::hlagh() CODE skip 'Test code didn\'t run properly' => $count unless defined $output; - like $output, qr/^(?:raddish at -e line \d+\.\n)+Execution(?s:.*)/, + like $output, expect('raddish', '-e', "\nExecution(?s:.*)"), 'die in free callback at compile time and not in eval string'; --$count; }