in reply to Re^2: (??{ code }) versus (?PARNO) for recursive regular expressions
in thread (??{ code }) versus (?PARNO) for recursive regular expressions
Still throws a strictures warning.
Of course. Variable declarations includes our.
These work:
1. no strict; $x = qr/(??{ $x })/; 2. use strict; our $x = qr/(??{ our $x })/ 3. use strict; our $x = qr/(??{ no strict; $x })/ 4. use strict; our $x; $x = qr/(??{ $x })/ 5. use strict; my $x; $x = qr/(??{ $x })/
I think there was once a bug where some or all pragmas didn't propagate into (??{ }) and the like. If so, the following would have worked because it would have been equivalent to #3 above:
6. use strict; our $x = qr/(??{ $x })/
The earliest I have here is 5.10.1, and it doesn't have this bug.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: (??{ code }) versus (?PARNO) for recursive regular expressions
by wind (Priest) on Mar 25, 2011 at 23:32 UTC | |
by ikegami (Patriarch) on Mar 25, 2011 at 23:46 UTC | |
by wind (Priest) on Mar 26, 2011 at 00:45 UTC | |
by ikegami (Patriarch) on Mar 26, 2011 at 02:49 UTC | |
by wind (Priest) on Mar 26, 2011 at 03:32 UTC | |
|