XP is just a number | |
PerlMonks |
Re: How to handle Errors?by Elijah (Hermit) |
on Apr 05, 2004 at 19:25 UTC ( [id://342715]=note: print w/replies, xml ) | Need Help?? |
Well error handling for your specific project will be just that, specific to your project. The scenerios you may or may not run into in this particular app will be most likely assosiated to the app therefore an error module probably would be a bad idea.
Write a module for a common task or event you plan on using across numerous projects and that would apply to numerous projects. In my opinion error handling does not fall into that category. The main thing you should do with seeting up your logic flow for your project is handle ALL errors first in each situation. If you are envoking @ARGV at the command line then parse all command line args first and handle every possible error that could happen at command line (like typos or missing arguments) and then if all args pass then handle the obviously correct input (due to passing your error handling) accordingly. Ex:
www.perlskripts.com
In Section
Seekers of Perl Wisdom
|
|