git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
442a38f
)
common: early setup of plp error formatting
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 27 Apr 2017 01:20:59 +0000
(
03:20
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 29 May 2017 17:09:01 +0000
(19:09 +0200)
Load at BEGIN to catch compile-time errors.
common.inc.plp
patch
|
blob
|
history
diff --git
a/common.inc.plp
b/common.inc.plp
index 6b45e50042d6bb5f5f52420198905e2f41ac53db..d7e2b7936e2674f2b13c8abf507319d9ead36f4c 100644
(file)
--- a/
common.inc.plp
+++ b/
common.inc.plp
@@
-20,15
+20,15
@@
sub Alert {
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()];
+
+ $PLP::ERROR = sub {
+ my ($text, $html) = @_;
+ warn $text;
+ Alert("<strong>Fatal error</strong>: $html.");
+ };
}
# user request