You might want to look at Log::Log4perl. It can do everything you want with a little work:

read contact info from a central file:

Check. You can do something like Log::Log4perl::init('/etc/log4perl.conf'); at the start of your script to setup logging for all modules.

Control how often emails get sent

Write a custom appender and you can make it do whatever you like. Log::Log4perl::Appender::Buffer could probably do what you want.

Optionally override normal warn/die/carp/croak calls

See My program already uses warn() and die(). How can I switch to Log4perl? in the FAQ.

Optionally handle unexpected death as well as die/croak calls

See How can I make sure my application logs a message when it dies unexpectedly? in the FAQ.

Make it so the user can do as much configuration as possible at the beginning

You can do all the configuration in one call at the start.


In reply to Re: RFC: Module idea: Carp + controlled email by adrianh
in thread RFC: Module idea: Carp + controlled email by pileofrogs

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.