From: Steinar H. Gunderson Date: Thu, 8 Jun 2017 07:27:53 +0000 (+0200) Subject: Minor fixes to the Perl frontend. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=66abb549375189d50dc00c93071afa0cf19611b1;hp=875b086391c824db13ebfb86303105ba18c462a9;p=remoteglot-book Minor fixes to the Perl frontend. --- diff --git a/www/opening-stats.pl b/www/opening-stats.pl index f13e0a8..a88b0a2 100755 --- a/www/opening-stats.pl +++ b/www/opening-stats.pl @@ -48,6 +48,9 @@ eval { $root_game->{'eco'} = $pgn->eco; $root_game->{'moves'} = int(((scalar @{$pgn->moves}) + 1) / 2); }; +if ($@) { + print STDERR "Error while getting root move: $@\n"; +} # Explore one move out. my $white_left = $json_root_pos->{'white'}; @@ -128,6 +131,7 @@ sub read_root_pgn { or die "../pgnnames.txt: $!"; while (<$pgnnamesfh>) { chomp; + s/^comp://; push @pgnnames, $_; } close $pgnnamesfh;