$Request ||= 'bw';
$Request = 'lotv' if $Request eq '2';
-my %scver = %{ $scvers{$Request} }
- or Abort("Requested version $Request not available", '404 unknown');
+my %scver = %{ $scvers{$Request} // {} }
+ or Html(), Abort("Requested version <q>$Request</q> not available", '404 request not found');
my $datafile = "sc-units-$Request.inc.pl";
Html({
title => "$scver{title} unit cheat sheet",
- version => '1.1',
+ version => '1.2',
description => [
"Reference of $scver{game} unit properties,"
. " comparing various statistics of all the units in $scver{name}"
$scver{major} < 2 ? qw' bw broodwar brood war ' :
qw' starcraft2 lotv hots wol ',
],
- stylesheet => [qw'light'],
- raw => '<link rel="stylesheet" type="text/css" media="all" href="/sc.css?1.1" title="light">',
+ stylesheet => [qw( light dark )],
+ raw => '<link rel="stylesheet" type="text/css" media="all" href="/sc.css?1.2">',
data => [$datafile],
});