diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-06-01 17:50:45 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-06-01 20:36:54 -0700 |
commit | f4002a4b28f07b3fb42d7d9f51824195afcc07b2 (patch) | |
tree | 5c0004be4bf6e18ea3517ad38dd1f4a367bc4161 | |
parent | bf8fb5ebdd40c5dae131bdfb08395be447f81573 (diff) | |
download | perl-f4002a4b28f07b3fb42d7d9f51824195afcc07b2.tar.gz |
Deparse glob the same way regardless of PERL_EXTERNAL_GLOB
This should fix the recent new failure in the VMS smokes
(since 2f77d7b).
-rw-r--r-- | dist/B-Deparse/Deparse.pm | 12 | ||||
-rw-r--r-- | dist/B-Deparse/t/deparse.t | 2 | ||||
-rw-r--r-- | ext/B/t/concise-xs.t | 1 |
3 files changed, 11 insertions, 4 deletions
diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index d2cb254a02..fbc1c63750 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 49487738d9..b1bd1e277f 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,'); +<a,>; #### # [perl #91008] each $@; diff --git a/ext/B/t/concise-xs.t b/ext/B/t/concise-xs.t index fa120b03bd..a518eb7505 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 |