in reply to How do I debug a .pm module

As ikegami hinted, if you are not using the latest version of Mail::Audit, then you should consider upgrading, though it would be an idea to read the changelog and bug reports to see if your problem has been fixed, or if anyone else is seeing the same problem.

If the problem persits when you are on the latest version, then you need to figure out what set of curcumstances are triggering the problem. (Assuming you don't allready know). The way to do this is with logging. If I where in your sitution I would install Log::Log4perl, then make local coppies of the modules that you suspect, including your code that calls Mail::Audit. I would add lots of logging statements, so that when your mail program next aborts, you can trace back and figure out what caused it to break.

Chances are once you find the set of curcumstances trigger the problem, you will do a facepalm because it will be something silly like passing in a hash ref to the cc list when you should have passed in an array ref.

If it is not your bug, then you can either report the bug to the module author, or debug the module and fix the bug yourself. Presumably you know how to use the perl debugger?