|The stupid question is the question not asked|
Re^3: Turning on regexp debugging at runtimeby SBECK (Hermit)
|on Sep 23, 2014 at 16:15 UTC||Need Help??|
Thanks for both of these replies, especially the second since I wasn't aware of the DEBUG_REGEX environment variable.
I should have been a bit clearer, but it appears that what I want to do probably can't be done. For example, say I have the absurdly simple script:
what I want to do is step through the code (in the debugger) and turn on debugging (by executing "use re 'debug'") when I match against $re2 but then turn it back off before proceeding to the $re3 match.
I could put each in it's own scope, but that would be messy (I don't really want to put every regexp in it's own scope so that I could potentially debug it individually).
Even worse is that the regexps in question were built outside of the scope, so I actually end up with something more similar to this:
which won't print any debugging info at all.
Oh well, I can do what I've always done (temporarily enable debugging and then go to the point in the code I'm interested in ignoring all the unwanted debugging output).