]> git.vpit.fr Git - perl/modules/indirect.git/commitdiff
In ck_entersub, only try to recover the method name if it's actually a method
authorVincent Pit <vince@profvince.com>
Mon, 11 Aug 2008 09:36:26 +0000 (11:36 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 11 Aug 2008 09:36:26 +0000 (11:36 +0200)
indirect.xs

index 328214f3b68198dd9afac7aab4297efa06af2368..67cba846a98299092b75e3e919150c2c711ca843 100644 (file)
@@ -175,12 +175,15 @@ STATIC OP *indirect_ck_entersub(pTHX_ OP *o) {
    om = om->op_sibling;
   if (om->op_type == OP_METHOD)
    om = cUNOPx(om)->op_first;
+  else if (om->op_type != OP_METHOD_NAMED)
+   goto done;
   pm = indirect_map_fetch(om, &svm);
   po = indirect_map_fetch(oo, &svo);
   if (pm && po && pm < po)
    ((hint == 2) ? croak : warn)(indirect_msg, SvPV_nolen(svm), SvPV_nolen(svo));
  }
 
+done:
  return CALL_FPTR(indirect_old_ck_entersub)(aTHX_ o);
 }