X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/02a613aad40864c291bb2e8d499050d4aa6fc344..a93c5c61b18192c5f74256e3cb18e7f1cd2034d5:/common.inc.plp diff --git a/common.inc.plp b/common.inc.plp index d0e1c32..f7ca700 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -47,10 +47,10 @@ BEGIN { our $Dev = $ENV{HTTP_HOST} =~ /\bdev\./; } -our $Request = decode_utf8($ENV{PATH_INFO} =~ s{^/}{}r); +our $Request //= decode_utf8($ENV{PATH_INFO} =~ s{^/}{}r); our $style; -our $showkeys = !exists $get{keys} ? undef : +our $showkeys //= !exists $get{keys} ? undef : ($get{keys} ne '0' && ($get{keys} || 'always')); $header{content_type} = 'text/html; charset=utf-8'; @@ -78,7 +78,7 @@ sub stylesheet { return map { sprintf( '', - $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.11", $_ + $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.12", $_ ) } @avail; } @@ -198,7 +198,7 @@ BEGIN { $PLP::ERROR = sub { my ($text, $html) = @_; warn $text; - unless ($PLP::sentheaders and $PLP::sentheaders->[0] !~ m{/PLP\.pm$}) { + unless ($PLP::sentheaders) { Html({nocache => 1}); say '

Page unavailable

'; }