Yitzchak Scott-Thoennes wrote:
On Sat, Nov 13, 2004 at 11:56:27AM +0000, Brian McCauley wrote:

David Nichol is not talking nonsense, he is right

 $foo =~ 'literal';

...is correctly parsed as ...

$foo =~ EXPR


Nope; if it were, it *would* be subject to needing use re "eval"; the
problem is that currently

   $foo =~ 'literal';

is silently treated like

$foo =~ /literal/;

So what you are saying is that 'use re "eval";' setting is implicitly on during constant folding and is not what one would consider the "Right Thing(TM)".


OK, I can see that that is true but I cannot conceive a real-world situation where this would ever matter. Actually, IIRC, it's just one of many lexically-scope pramas that don't get applied correctly during constant folding some of which do have real-world consequences.

You describe this behaviour as "the problem" which presumably means that you _can_ see a situation where perl spuriously enabling 'use re "eval";' during constant folding would matter. Could you give an example please.



Reply via email to