NAME
oEdtk::FatalsToEmail - turn fatal errors into an email
SYNOPSIS
use oEdtk::FatalsToEmail
Address => 'admin@example.com',
Mailhost => 'smtp.example.com';
DESCRIPTION
Installs a __DIE__ handler that prefixes the fatal message with its location, prints a short apology, mails the details and then re-dies. The Address, Mailhost, Cache and Seconds parameters are given at load time; when a Cache file is set, messages that arrive within Seconds are coalesced into a single email. Adapted from Randal L. Schwartz (Stonehenge).
FUNCTIONS
import
use oEdtk::FatalsToEmail Address => $address, Mailhost => $smtp;
Set the module parameters at load time. An unknown key or a missing value is an error.
send_mail
send_mail($message);
Email $message to the configured address through Net::SMTP, optionally through the cache file. Dies when the transfer fails.
The trapper sub is the internal handler installed as $SIG{__DIE__}; it is not part of the public API.
AUTHOR
The oEdtk team.