X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/ce551a5d55b12c8b377e9331fbfe4d67790934e4..26b42ef92dccbff26573149d6886958862455d81:/common.inc.plp?ds=sidebyside diff --git a/common.inc.plp b/common.inc.plp index 68ada33..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()]; @@ -72,7 +86,7 @@ sub stylesheet { return map { sprintf( '', - $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.10", $_ + $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.11", $_ ) } @avail; } @@ -120,7 +134,7 @@ sub Html { unshift @{ $meta->{raw} }, stylesheet($meta->{stylesheet}); push @{ $meta->{raw} }, ( - '', + '', ); # optional amends @@ -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 {