in reply to Perl debugger fixes bug, now i've got a perl debugger to get rid of.

I would suspect a timing issue - when in 'production' mode, occassionally the timing of things causes a failure - a slightly delayed socket connection, a signal that gets delayed etc. When in debug mode, with everything running slower, the critical points for this behaviour get spread out and are no longer an issue.

I'd try getting better feedback from your script, in production mode, when the failure occurs, using Data::Dumper, Carp etc to report verbosely about your code's state. If you can't provoke the error at will, you need to get as much info as possible when it does happen.

Also, trap and test the return code of everything - and I mean everything.

Try writing your own signal handlers too, if that seems appropriate - stuff like

$SIG{'INT'} = &int_handler; sub int_handler { ...verbose state printing here... }

+++++++++++++++++
#!/usr/bin/perl
use warnings;use strict;use brain;

  • Comment on Re: Perl debugger fixes bug, now i've got a perl debugger to get rid of.
  • Download Code