use HTTP::Date;
use Encode qw( decode_utf8 );
+sub Alert {
+ my ($title, $debug) = @_;
+ $title .= ": <em>$debug</em>" if $Dev and defined $debug;
+ say "<p class=error>$title</p>\n";
+}
+
$PLP::ERROR = sub {
my ($text, $html) = @_;
- print '<p class="error"><strong>Fatal error</strong>: '.$html."</p>\n\n";
+ Alert("<strong>Fatal error</strong>: $html.");
warn $text;
};