X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/8b7138baf6e7be3d9184c97c4f6525459ab1af40..ff4a38aff3e2d22ef34e33cd5df7a16d8ceeb196:/common.inc.plp
diff --git a/common.inc.plp b/common.inc.plp
index 7935a8e..d7e2b79 100644
--- a/common.inc.plp
+++ b/common.inc.plp
@@ -20,15 +20,15 @@ sub Alert {
say "
$body
\n";
}
-$PLP::ERROR = sub {
- my ($text, $html) = @_;
- Alert("Fatal error: $html.");
- warn $text;
-};
-
BEGIN {
require Time::HiRes;
- our $Time = [Time::HiRes::gettimeofday];
+ our $Time = [Time::HiRes::gettimeofday()];
+
+ $PLP::ERROR = sub {
+ my ($text, $html) = @_;
+ warn $text;
+ Alert("Fatal error: $html.");
+ };
}
# user request