diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/B/Deparse.pm | 6 | ||||
-rw-r--r-- | lib/B/Deparse.t | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm index f1f45f8dd4..550a4a17dc 100644 --- a/lib/B/Deparse.pm +++ b/lib/B/Deparse.pm @@ -5313,6 +5313,12 @@ sub re_flags { my ($self, $op) = @_; my $flags = ''; my $pmflags = $op->pmflags; + if (!$pmflags) { + my $re = $op->pmregexp; + if ($$re) { + $pmflags = $re->compflags; + } + } $flags .= "g" if $pmflags & PMf_GLOBAL; $flags .= "i" if $pmflags & PMf_FOLD; $flags .= "m" if $pmflags & PMf_MULTILINE; diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t index 740138a3e2..0ad4d00416 100644 --- a/lib/B/Deparse.t +++ b/lib/B/Deparse.t @@ -1230,6 +1230,12 @@ print /@b/; print qr/@a/; print qr/@b/; #### +# =~ QR_CONSTANT +use constant QR_CONSTANT => qr/a/soupmix; +'' =~ QR_CONSTANT; +>>>> +'' =~ /a/impsux; +#### # $lexical =~ // my $x; $x =~ //; |