in reply to Re: Re: Re: Re: Re: Re: Re: Risks in the oblivious use of qr//
in thread Risks in the oblivious use of qr//
That is exactly what I'm saying. The fact that a qr// regex stringifies with a (?-xism:$re) wrapper doesn't mean to me that it is actually core to it. The regex itself is hard coded into some nodes which actually indicate which of 'ism' apply and its that that you're saying should remain static and I'm saying should bend. Now please keep in mind that I've moderated my stance a bit and I only think /i is acceptable to have this behaviour for. The other three flags 'x', 's' and 'm' have more significant meaning and I can't bring myself to think of a situation where it would make sense to override any of those.
So really, what I'm saying is that if you had previously said $test = qr/test/ and later said /$test FOO!/i that the /i-ness of the $test object would be overridden and that if you wanted to keep that you'd have to said /(?i:$test) FOO!/i. I had originally written $test = "test" then all of this would behave exactly as I'm suggesting. (except that 'xms' wouldn't be specified either).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Re: Re: Re: Risks in the oblivious use of qr//
by waswas-fng (Curate) on Aug 11, 2003 at 18:06 UTC | |
by diotalevi (Canon) on Aug 11, 2003 at 18:26 UTC | |
by demerphq (Chancellor) on Aug 12, 2003 at 14:25 UTC | |
by diotalevi (Canon) on Aug 12, 2003 at 15:12 UTC | |
by demerphq (Chancellor) on Aug 12, 2003 at 16:52 UTC | |
|