use File::stat 'stat';
use HTTP::Date;
-use Shiar_Sheet::KeySigns qw(%sign); # dependant on $get{ascii}
+use Shiar_Sheet::KeySigns qw(%sign);
our $style;
our $showkeys = !exists $get{keys} ? undef :
return join "\n", map { sprintf(
'<link rel="%s" type="text/css" media="all" href="%s" title="%s">',
- $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css", $_
+ $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.5", $_
) } @_;
}
# announce and check data modification
checkmodified(
$ENV{SCRIPT_FILENAME},
- (grep { /^Shiar_/ } values %INC),
+ (grep { /\bShiar_/ } values %INC),
$meta->{data} ? @{ $meta->{data} } : (),
);
+ $header{'Cache-Control'} = sprintf 'max-age: ', 24*60*60;
# default fallbacks
$meta->{stylesheet} ||= [qw'light dark circus mono red terse'];
ref $_ eq 'ARRAY' and $_ = stylesheet(@$_)."\n" for $meta->{stylesheet};
# other vars
- my $sep = $meta->{charset} eq 'utf-8' ? '•' : ' -- ';
my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;
# leading output
PLP_END {
print <<"EOT";
<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/$file.<a href="/source/$file.plp"
+ <a href="/" rel="start">sheet.shiar.nl</a>/$file.<a href="/source/$file.plp"
rel="code" title="Written in Perl">plp</a>
<a href="http://git.shiar.nl/sheet.git/history/HEAD:/$file.plp"
rel="vcs-git" title="Git repository">$meta->{version}</a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> $sep
+ created by <a href="http://shiar.nl/" rel="author">Shiar</a> $sign{sep}
<a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
</p>