On Dec 21, 2007 12:08 PM, demerphq <demerphq@gmail.com> wrote: > No it wont actually. The warning would only be raised when the $qr > variable is the only thing in the pattern. The diagnostics should read > (added an 'only'): > > +(W regexp) Your pattern contains only a variable containing a precompiled > +regular expression pattern whose behavior will not be changed by the > +pattern modifiers provided. > > $qr=/^foo/; > $x=~/$qr/m; # warns; > $x=~/$qr|foo/m; #does not warn > $x=~/$qr/x; # does not warn (/x doesnt change match semantics) In the current implementation yes, but we might potentially want to warn in the future on useless modifiers in general, eg: $x =~ /(?-msix:^foo)/msi;Thread Previous | Thread Next