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 =~ /[<>]/) {
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;
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) {
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