From: Graham Knop Date: Fri, 13 Jun 2014 11:54:03 +0000 (-0400) Subject: correct error check with fatal warnings X-Git-Tag: v1.003000~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1f3ae1a298b5ce93414e8a67d2f4cbd9ec9c381e;p=p5sagit%2FEval-WithLexicals.git correct error check with fatal warnings --- diff --git a/t/hints.t b/t/hints.t index 88bbec3..5ce67d8 100644 --- a/t/hints.t +++ b/t/hints.t @@ -24,8 +24,9 @@ $eval->eval('use strictures 1'); { local $SIG{__WARN__} = sub { }; - ok !eval { $eval->eval('$x') }, 'Unable to use undeclared variable'; - like $@, qr/requires explicit package/, 'Correct message in $@'; + ok !eval { $eval->eval('${"x"}') }, 'Unable to use undeclared variable'; + like $@, qr/Can't use string .* as a SCALAR ref/, + 'Correct message in $@'; } is(