From: Vincent Pit Date: Sat, 17 Jan 2009 12:34:52 +0000 (+0100) Subject: Yet more diagnostics for t/30-scope.t X-Git-Tag: v0.10~1 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=commitdiff_plain;h=fdc979b79c21fcaa1fdd8e9a465756510ed26e88 Yet more diagnostics for t/30-scope.t --- diff --git a/t/30-scope.t b/t/30-scope.t index 20eeebb..2546dee 100644 --- a/t/30-scope.t +++ b/t/30-scope.t @@ -17,14 +17,15 @@ sub expect { { my $code = do { local $/; }; - my (%res, @left); + my (%res, $num, @left); { local $SIG{__WARN__} = sub { + ++$num; my $w = join '', 'warn:', @_; if ($w =~ /"P(\d+)"/ and not exists $res{$1}) { $res{$1} = $w; } else { - push @left, $w; + push @left, "[$num] $w"; } }; eval "die qq{ok\\n}; $code";