in reply to CGI... uninitialized value... which variables?

For the varies errors and warnings I get from CGI, I like to have a semi-generic module I can call to print to a logfile with the basic information (variable data, short descriptive error message, time/date, line number, some error code/variable to send to HTML::Template (for the user to see), and etc. Note this will not replace Data::Dumper for debugging errors nor die for serious errors, but is very helpful for errors like a param being empty or invalid (esp. if it is in a sub that you can call like this: error() unless defined $someparam;). Just my way of doing things.

"Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce

Replies are listed 'Best First'.
Re^2: CGI... uninitialized value... which variables?
by mrjcleaver (Initiate) on Sep 30, 2004 at 09:55 UTC
    Thanks.

    Do you have a mechanism to make it get called during die? That would be a great way of getting CGI to spit out the context information needed to make sense of why trouble had occurred.

    Is the code available anywhere?