Subject: | Wish: supply flags to regex() |
I'd like to create an object model for a regexp that might have an 'x'
modifier set, like m/ foo [ ] bar /x. I can manually wrap my regexp as
"(?x: foo [ ] bar )" before handing to Regexp::Parser, but that of
course changes the resulting tree.
Could you please add an optional flag to the regex() method which would
let me pre-set the $self->{flags} value?
Alternatively, my problem could be solved by adding a method which let
me peel off the outer group and return a new Regexp::Parser instance.
I'm using this for some new Perl::Critic policies that analyze the
interior of regexps.
Chris