I like that idea, but it's not really safe, what with code blocks inside of regular expressions these days.
use re 'debug'; my $x = qr/a(??{ BEGIN { die } })/; __END__ Compiling REx "a(??{ BEGIN{ die } })" panic: top_env
Tests with code other than die also shows the BEGIN block being executed even though the regular expression is never used.
In reply to Re^2: Assessing the complexity of regular expressions
by kyle
in thread Assessing the complexity of regular expressions
by kyle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |