From: Father Chrysostomos Date: Thu, 2 Jun 2011 00:50:45 +0000 (-0700) Subject: Deparse glob the same way regardless of PERL_EXTERNAL_GLOB X-Git-Tag: accepted/trunk/20130322.191538~3972 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4002a4b28f07b3fb42d7d9f51824195afcc07b2;p=platform%2Fupstream%2Fperl.git Deparse glob the same way regardless of PERL_EXTERNAL_GLOB This should fix the recent new failure in the VMS smokes (since 2f77d7b). --- diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index d2cb254..fbc1c63 100644 --- a/dist/B-Deparse/Deparse.pm +++ b/dist/B-Deparse/Deparse.pm @@ -2428,9 +2428,6 @@ sub pp_syscall { listop(@_, "syscall") } sub pp_glob { my $self = shift; my($op, $cx) = @_; - if ($op->flags & OPf_SPECIAL) { - return $self->deparse($op->first->sibling); - } my $text = $self->dq($op->first->sibling); # skip pushmark if ($text =~ /^\$?(\w|::|\`)+$/ # could look like a readline or $text =~ /[<>]/) { @@ -2816,6 +2813,7 @@ BEGIN { eval "sub OP_CONST () {" . opnumber("const") . "}" } BEGIN { eval "sub OP_STRINGIFY () {" . opnumber("stringify") . "}" } BEGIN { eval "sub OP_RV2SV () {" . opnumber("rv2sv") . "}" } BEGIN { eval "sub OP_LIST () {" . opnumber("list") . "}" } +BEGIN { eval "sub OP_GLOB () {" . opnumber("glob") . "}" } sub pp_null { my $self = shift; @@ -2833,6 +2831,14 @@ sub pp_null { return $self->pp_scope($op->first, $cx); } elsif ($op->targ == OP_STRINGIFY) { return $self->dquote($op, $cx); + } elsif ($op->targ == OP_GLOB) { + return $self->pp_glob( + $op->first # entersub + ->first # ex-list + ->first # pushmark + ->sibling, # glob + $cx + ); } elsif (!null($op->first->sibling) and $op->first->sibling->name eq "readline" and $op->first->sibling->flags & OPf_STACKED) { diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t index 4948773..b1bd1e2 100644 --- a/dist/B-Deparse/t/deparse.t +++ b/dist/B-Deparse/t/deparse.t @@ -721,7 +721,7 @@ tr/a/b/r; tr/\x{345}/\x{370}/; #### # [perl #90898] -glob('a,'); +; #### # [perl #91008] each $@; diff --git a/ext/B/t/concise-xs.t b/ext/B/t/concise-xs.t index fa120b0..a518eb7 100644 --- a/ext/B/t/concise-xs.t +++ b/ext/B/t/concise-xs.t @@ -155,6 +155,7 @@ my $testpkgs = { constant => [qw/ ASSIGN CVf_LVALUE CVf_METHOD LIST_CONTEXT OP_CONST OP_LIST OP_RV2SV + OP_GLOB OP_STRINGIFY OPf_KIDS OPf_MOD OPf_REF OPf_SPECIAL OPf_STACKED OPf_WANT OPf_WANT_LIST OPf_WANT_SCALAR OPf_WANT_VOID OPpCONST_ARYBASE OPpCONST_BARE OPpCONST_NOVER