Load at BEGIN to catch compile-time errors.
say "<div class=error>$body</div>\n";
}
say "<div class=error>$body</div>\n";
}
-$PLP::ERROR = sub {
- my ($text, $html) = @_;
- Alert("<strong>Fatal error</strong>: $html.");
- warn $text;
-};
-
BEGIN {
require Time::HiRes;
our $Time = [Time::HiRes::gettimeofday()];
BEGIN {
require Time::HiRes;
our $Time = [Time::HiRes::gettimeofday()];
+
+ $PLP::ERROR = sub {
+ my ($text, $html) = @_;
+ warn $text;
+ Alert("<strong>Fatal error</strong>: $html.");
+ };