Perlish way to report module errors?

From: H. Wade Minter (minter_at_lunenburg.org)
Date: 02/23/05


Date: Wed, 23 Feb 2005 16:04:09 GMT

I'm working on my first couple of CPAN modules - they seem to be useful and
functional, good times.

I'm reporting errors to the users by, when a problem is found that would
impact execution of the module, setting $@ and returning undef. The POD
tells the user to check the return code for success, and look in $@ for more
details on errors.

It's working, but I have a sneaking suspicion that it may not be the "right"
way to do things. Is the way I'm doing it considered Perl-friendly? If not,
what's the canonical way to report an error and have a way for the user to
get details?

Thanks,
Wade