perlpal has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Im currently working on enhancing scripts with more exhaustive debugging and error-reporting mechanisms. Im aware of the following : > use strict - pragma > warnings > eval - function > die - function > $! - special variable Please could anyone shed more light on possible mechanisms that i may have missed out on? Thanks In Advance!

Replies are listed 'Best First'.
Re: Error Handling/Debugging in Perl
by puudeli (Pilgrim) on Jan 16, 2009 at 07:47 UTC
    • print is your friend, you can print to a file for logging
    • perldebug is a good friend indeed
    • Data::Dumper can tell you what your variables have eaten
    --
    seek $her, $from, $everywhere if exists $true{love};
Re: Error Handling/Debugging in Perl
by svenXY (Deacon) on Jan 16, 2009 at 07:56 UTC
Re: Error Handling/Debugging in Perl
by targetsmart (Curate) on Jan 16, 2009 at 10:44 UTC
    Log::Agent and its related modules can be useful for debugging and error reporting. It can be combined with Log::Agent::Driver::File and Log::Agent::Rotate for easy file based debug/error/output messages logging.