From 75ea41ae51200ab26d84c418f08859a784a71b85 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Sun, 5 Mar 2023 12:40:19 +0000 Subject: Have newATTRSUB() call class_wrap_method_body() if CVf_IsMETHOD --- perly.y | 5 ----- 1 file changed, 5 deletions(-) (limited to 'perly.y') diff --git a/perly.y b/perly.y index 8a3b8dcd12..ae5c22993f 100644 --- a/perly.y +++ b/perly.y @@ -394,9 +394,6 @@ barestmt: PLUGSTMT OP *body = $optsigsubbody; SvREFCNT_inc_simple_void(PL_compcv); - if($sigsub_or_method_named == KW_METHOD_named) { - body = class_wrap_method_body(body); - } $subname->op_type == OP_CONST ? newATTRSUB($startsub, $subname, NULL, $subattrlist, body) : newMYSUB( $startsub, $subname, NULL, $subattrlist, body) @@ -425,7 +422,6 @@ barestmt: PLUGSTMT switch($PHASER) { case KEY_ADJUST: - body = class_wrap_method_body(body); cv = newATTRSUB($startsub, NULL, NULL, NULL, body); class_add_ADJUST(PL_curstash, cv); break; @@ -1347,7 +1343,6 @@ anonymous OP *body = $sigsubbody; SvREFCNT_inc_simple_void(PL_compcv); - body = class_wrap_method_body(body); $$ = newANONATTRSUB($startanonsub, NULL, $subattrlist, body); } ; -- cgit v1.2.1