X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/017f784142bc2a77d8e283dc61ff6306e556387d..0ca6c51273fb8cadc0a5ded13f5595743ac16640:/common.inc.plp diff --git a/common.inc.plp b/common.inc.plp index a1eb3e5..6ea1197 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -133,6 +133,7 @@ sub Html { # default fallbacks $meta->{stylesheet} ||= [qw( light dark circus mono red )]; $meta->{charset} ||= 'utf-8'; + $meta->{lang} ||= 'en'; # convert options to arrays ref $_ eq 'ARRAY' or $_ = [$_] @@ -161,7 +162,7 @@ sub Html { PLP_START { # leading output say ''; - say ''; + say qq(); say ''; say ''; say sprintf '', $_ @@ -233,10 +234,9 @@ BEGIN { sub showlink { my ($title, $href, $selected) = @_; - return sprintf( - !$href ? '%s' : - $selected ? '%s' : '%s', - EscapeHTML($title), EscapeHTML($href) - ); + EscapeHTML($title); + return $title if not $href; + return "$title" if $selected; + return sprintf '%s', EscapeHTML($href), $title; }