This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
This is getting pretty fragmented (finish up #17441).
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 9 Jul 2002 15:41:57 +0000 (15:41 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 9 Jul 2002 15:41:57 +0000 (15:41 +0000)
p4raw-id: //depot/perl@17443

pp_ctl.c
t/op/eval.t

index 2fb4b17..971df59 100644 (file)
--- 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");
 
index 17b8d9d..5897b2b 100755 (executable)
@@ -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";
+}