develooper Front page | perl.perl5.porters | Postings from June 2012

Re: [perl #6011] /imsx not visible inside (??{})

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
June 7, 2012 01:39
Subject:
Re: [perl #6011] /imsx not visible inside (??{})
Message ID:
20120607083932.GB2815@iabyn.com
On Wed, Jun 06, 2012 at 10:58:37PM +0100, Dave Mitchell wrote:
> On Wed, Jun 06, 2012 at 08:25:18PM +0200, Aristotle Pagaltzis wrote:
> > * Ricardo Signes <perl.p5p@rjbs.manxome.org> [2012-06-06 00:30]:
> > > I'm interested in what other people think, though!
> > 
> > I think if a string is returned it should be compiled with the outer
> > pattern’s flags, simply because of the relative difficulties of asking
> > for the opposite behaviour.
> 
> Ok I'm sold. I've fixed this in my re_eval branch.

(but seeing tests fail in regexp_qr_embed.t), a further question:

should (?flags:...) also propagate into (??{}), e.g. should this match:

    print "match\n" if "A" =~ /^(?i:(??{'a'}))/;

I noted this because regexp_qr_embed.t does

    my $RE = qr/(??{'a'})/i;
    "A" =~ /(:)$RE(?:)/

which in my code is failing, since I'm propagating the /i flag but not
the (?i:) flag.


-- 
"Do not dabble in paradox, Edward, it puts you in danger of fortuitous wit."
    -- Lady Croom, "Arcadia"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About