Skip to content

Commit

Permalink
Correctly deparse <<>>
Browse files Browse the repository at this point in the history
  • Loading branch information
rgs committed Mar 24, 2015
1 parent 2e4abf2 commit 65ef2c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/B/Deparse.pm
Expand Up @@ -2642,7 +2642,11 @@ sub pp_readline {
my $self = shift;
my($op, $cx) = @_;
my $kid = $op->first;
return "<" . $self->deparse($kid, 1) . ">" if is_scalar($kid);
if (is_scalar($kid)) {
my $kid_deparsed = $self->deparse($kid, 1);
return '<<>>' if $op->flags & OPf_SPECIAL and $kid_deparsed eq 'ARGV';
return "<$kid_deparsed>";
}
return $self->unop($op, $cx, "readline");
}

Expand Down

0 comments on commit 65ef2c3

Please sign in to comment.