I encountered a very odd situation at work today. I was trying to debug a script (using 'perl -d /path/to/script.pl arg1 arg2 ...), and for reasons that baffle me the -d flag was apparently ignored. The script ran as if it simply wasn't there. I looked it over, looking for anything that seemed like it might conceivably trip up the debugger and was coming up with nothing. I checked earlier versions of the script, and they all entered normal debugging mode as expected.
Finally, I decided to simply start commenting out changes I'd made and keep trying until it worked. This strategy was useful, as the first line I commented out and tested turned out to be the apparent cause of the problem.
The line in question was simply a 'use' statement importing a module (part of my employer's site perl). I examined the module being imported and found nothing at all odd. I only needed a single, small subroutine from it, so I solved the problem (in the most temporary sense) by copying/pasting it into the script and calling it directly.
The module being called does work as expected regardless of the debugger strangeness. I'd love to post code here, but two things prevent me:
So my question is this. Has anyone else seen behavior like this out of the debugger? I've never heard of anything like this, and couldn't find any results that seemed relevant from google, perl.com, or here. It may not be relevant, but I believe the perl version is 5.8.8 running on Redhat/Fedora (not certain of version, but probably FC6).
Relevant links and anecdotes would be most appreciated.
Thanks,
jackofnotradesIn reply to Debugger weirdness by jackofnotrades
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |