Deparse glob the same way regardless of PERL_EXTERNAL_GLOB
authorFather Chrysostomos <sprout@cpan.org>
Thu, 2 Jun 2011 00:50:45 +0000 (17:50 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 2 Jun 2011 03:36:54 +0000 (20:36 -0700)
This should fix the recent new failure in the VMS smokes
(since 2f77d7b).

dist/B-Deparse/Deparse.pm
dist/B-Deparse/t/deparse.t
ext/B/t/concise-xs.t

index d2cb254..fbc1c63 100644 (file)
@@ -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) {
index 4948773..b1bd1e2 100644 (file)
@@ -721,7 +721,7 @@ tr/a/b/r;
 tr/\x{345}/\x{370}/;
 ####
 # [perl #90898]
-glob('a,');
+<a,>;
 ####
 # [perl #91008]
 each $@;
index fa120b0..a518eb7 100644 (file)
@@ -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