From: Vincent Pit Date: Wed, 20 Aug 2008 11:36:10 +0000 (+0200) Subject: An entersub has always at least a pushmark and a rv2cv X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=429a59ef0920be32c4263b67fc0a32b542ae34be;p=perl%2Fmodules%2FSub-Nary.git An entersub has always at least a pushmark and a rv2cv --- diff --git a/lib/Sub/Nary.pm b/lib/Sub/Nary.pm index 7fe0858..1406d66 100644 --- a/lib/Sub/Nary.pm +++ b/lib/Sub/Nary.pm @@ -343,11 +343,9 @@ sub pp_entersub { my ($self, $op) = @_; $op = $op->first while $op->flags & OPf_KIDS; - return undef, 0 if null $op; - if (name($op) eq 'pushmark') { - $op = $op->sibling; - return undef, 0 if null $op; - } + # First must be a pushmark + $op = $op->sibling; + # Next must be non null - at worse it's the rv2cv my $r; my $c = 1;