This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
You can't have special blocks if the subroutine has an "anonymous"
authorNicholas Clark <nick@ccl4.org>
Wed, 31 Jan 2007 12:14:05 +0000 (12:14 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 31 Jan 2007 12:14:05 +0000 (12:14 +0000)
name for the debugger, so don't bother checking.

p4raw-id: //depot/perl@30085

op.c

diff --git a/op.c b/op.c
index ce3261e..bb2a32c 100644 (file)
--- a/op.c
+++ b/op.c
@@ -5368,8 +5368,6 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
     }
 
     if (name || aname) {
-       const char * const tname = (name ? name : aname);
-
        if (PERLDB_SUBLINE && PL_curstash != PL_debstash) {
            SV * const sv = newSV(0);
            SV * const tmpstr = sv_newmortal();
@@ -5395,8 +5393,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
            }
        }
 
-       if (!PL_error_count)
-           process_special_blocks(tname, gv, cv);
+       if (name && !PL_error_count)
+           process_special_blocks(name, gv, cv);
     }
 
   done: