From: Jarkko Hietaniemi Date: Tue, 9 Jul 2002 15:41:57 +0000 (+0000) Subject: This is getting pretty fragmented (finish up #17441). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16a5162ef8f03ce7b52872864f357f47f75a1771;p=p5sagit%2Fp5-mst-13.2.git This is getting pretty fragmented (finish up #17441). p4raw-id: //depot/perl@17443 --- diff --git a/pp_ctl.c b/pp_ctl.c index 2fb4b17..971df59 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -3276,7 +3276,7 @@ PP(pp_entereval) STRLEN len; OP *ret; - if (!SvPV(sv,len) || !len) + if (!SvPV(sv,len)) RETPUSHUNDEF; TAINT_PROPER("eval"); diff --git a/t/op/eval.t b/t/op/eval.t index 17b8d9d..5897b2b 100755 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -1,6 +1,6 @@ #!./perl -print "1..45\n"; +print "1..46\n"; eval 'print "ok 1\n";'; @@ -234,3 +234,10 @@ print $@; eval q{my $$$x}; print $@ ? "ok 45\n" : "not ok 45\n"; } + +# [ID 20020623.002] eval "" doesn't clear $@ +{ + $@ = 5; + eval q{}; + print length($@) ? "not ok 46\t# \$\@ = '$@'\n" : "ok 46\n"; +}