As for easily turning debugging on and off, here's one way via environment vars:
my $re1 = qr/foo|bar/; { use if $ENV{DEBUG_REGEX}, qw/re Debug EXECUTE/; my $re2 = qr/quz|baz/; print "xfoox"=~$re1, "ybazy"=~$re2; }
gives you run-time debug info on $re2 only when the environment var DEBUG_REGEX is set.
In reply to Re^2: Turning on regexp debugging at runtime
by Anonymous Monk
in thread Turning on regexp debugging at runtime
by SBECK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |