X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/d22e7febda8720bc38069f7061adb43b98143c48..26b42ef92dccbff26573149d6886958862455d81:/common.inc.plp?ds=sidebyside diff --git a/common.inc.plp b/common.inc.plp index e3316fc..7788049 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -20,6 +20,20 @@ sub Alert { say "
$code" + . " after output!"; + } + Alert($html, $debug); + exit; +} + BEGIN { require Time::HiRes; our $Time = [Time::HiRes::gettimeofday()]; @@ -132,36 +146,38 @@ sub Html { '', ) if $meta->{keys}; - # leading output - say ''; - say ''; - say ''; - say ''; - say sprintf '', $_ - for $header{content_type}; - say sprintf '
beta
', join('; ', - 'position: fixed', - 'right: 1em', - 'opacity: .5', - 'border: 1ex solid red', - 'border-width: 1ex 0', - 'z-index: 1', - 'background: inherit', - ) if $Dev; + PLP_START { + # leading output + say ''; + say ''; + say ''; + say ''; + say sprintf '', $_ + for $header{content_type}; + say sprintf 'beta
', join('; ', + 'position: fixed', + 'right: 1em', + 'opacity: .5', + 'border: 1ex solid red', + 'border-width: 1ex 0', + 'z-index: 1', + 'background: inherit', + ) if $Dev; + }; # prepare trailing output PLP_END {