Permalink
Browse files

in capture_warnings() we need to properly localize Level

otherwise we dont get the right line number back from calls to
like or ok() called from within the callback.
  • Loading branch information...
demerphq committed Dec 3, 2017
1 parent b3d0568 commit 7d3a9a28928144a74a169213baddab31db9f6d61
Showing with 1 addition and 0 deletions.
  1. +1 −0 t/test.pl
View
@@ -1519,6 +1519,7 @@ sub capture_warnings {
local @::__capture;
local $SIG {__WARN__} = \&__capture;
local $Level = 1;
&$code;
return @::__capture;
}

0 comments on commit 7d3a9a2

Please sign in to comment.