This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid redundant hv_delete call in pp_entereval
authorFather Chrysostomos <sprout@cpan.org>
Fri, 26 Nov 2010 20:44:43 +0000 (12:44 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 26 Nov 2010 20:45:13 +0000 (12:45 -0800)
This commit just avoids a redundant hv_delete call if leave_scope is
already going to do it.

pp_ctl.c

index 13a4f22..fa25681 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3953,7 +3953,7 @@ PP(pp_entereval)
            ? (PERLDB_LINE || PERLDB_SAVESRC)
            :  PERLDB_SAVESRC_INVALID) {
            /* Retain the filegv we created.  */
-       } else {
+       } else if (!saved_delete) {
            (void)hv_delete(PL_defstash, tmpbuf, len, G_DISCARD);
        }
        return PL_op->op_next;