@EXPORT = qw(&parse_info_clientside &fetch_with_rsync
&parse_info_serverside &parse_info_serverside_ocean
%oceans %commods %clients %routes %route_mysteries
@EXPORT = qw(&parse_info_clientside &fetch_with_rsync
&parse_info_serverside &parse_info_serverside_ocean
%oceans %commods %clients %routes %route_mysteries
&parse_pctb_commodmap %pctb_commodmap @pctb_commodmap
&get_our_version &check_tsv_line
&pipethrough_prep &pipethrough_run
&pipethrough_run_along &pipethrough_run_finish
&pipethrough_run_gzip
&cgipostform &yarrgpostform &cgi_get_caller
&parse_pctb_commodmap %pctb_commodmap @pctb_commodmap
&get_our_version &check_tsv_line
&pipethrough_prep &pipethrough_run
&pipethrough_run_along &pipethrough_run_finish
&pipethrough_run_gzip
&cgipostform &yarrgpostform &cgi_get_caller
our %oceans; # eg $oceans{'Midnight'}{'Ruby'}{'Eta Island'}= $sources;
our %clients; # eg $clients{'ypp-sc-tools'}= [ qw(last-page) ];
our %routes; # eg $routes{'Midnight'}{'Orca'}{'Tinga'}= $sources NB abbrevs!
our %route_mysteries; # eg $route_mysteries{'Midnight'}{'Norse'}= 3
our %oceans; # eg $oceans{'Midnight'}{'Ruby'}{'Eta Island'}= $sources;
our %clients; # eg $clients{'ypp-sc-tools'}= [ qw(last-page) ];
our %routes; # eg $routes{'Midnight'}{'Orca'}{'Tinga'}= $sources NB abbrevs!
our %route_mysteries; # eg $route_mysteries{'Midnight'}{'Norse'}= 3
our (%pctb_commodmap,@pctb_commodmap);
my %colours; # eg $colours{'c'}{'black'}= $sources
our (%pctb_commodmap,@pctb_commodmap);
my %colours; # eg $colours{'c'}{'black'}= $sources
-my @rawcm; # eg $rawcm[0]='fine rum'; $rawcm[1]='fine %c cloth'
+my (@rawcm, @nocm); # eg $rawcm[0]='fine rum'; $rawcm[1]='fine %c cloth'
+
+# IMPORTANT
+# when extending the format of source-info in a non-backward
+# compatible way, be sure to update update-master-info too.
@ctx= (sub { $colours{$colourkind}{lc $_} .= $src; });
} elsif (m/^commods$/) {
@ctx= (sub { push @rawcm, lc $_; });
@ctx= (sub { $colours{$colourkind}{lc $_} .= $src; });
} elsif (m/^commods$/) {
@ctx= (sub { push @rawcm, lc $_; });
+ } elsif (m/^vessels$/) {
+ @ctx= (sub {
+ m/^ ([A-Z][a-z\ ]+[a-z]) \t\s*
+ (small|medium|large) \t\s*
+ (\d+) \s*\t\s*
+ (\d+) $/x
+ or die;
+ $vessels{$1}= {
+ Shot => $2,
+ Volume => $3,
+ Mass => $4,
+ };
+ });
+ } elsif (m/^shot$/) {
+ @ctx= (sub {
+ m/^ ([a-z]+) \s+ (\d+) $/x or die;
+ $shotname2damage{$1}= $2;
+ });
my $ucname= ucfirst $name;
$commods{$ucname}{Srcs} .= $ss;
my $c= $commods{$ucname};
$c->{Volume}= 1000;
my $ucname= ucfirst $name;
$commods{$ucname}{Srcs} .= $ss;
my $c= $commods{$ucname};
$c->{Volume}= 1000;
if ($prop =~ m/^([1-9]\d*)(k?)g$/) {
$c->{Mass}= $1 * ($2 ? 1000 : 1);
} elsif ($prop =~m/^([1-9]\d*)l$/) {
if ($prop =~ m/^([1-9]\d*)(k?)g$/) {
$c->{Mass}= $1 * ($2 ? 1000 : 1);
} elsif ($prop =~m/^([1-9]\d*)l$/) {
parse_info1($master,'s');
my $local= '_local-info.txt';
if (stat $local) {
parse_info1($master,'s');
my $local= '_local-info.txt';
if (stat $local) {
}
sub parse_info_serverside_ocean ($) {
my ($oceanname) = @_;
die "unknown ocean $oceanname ?" unless exists $oceans{$oceanname};
}
sub parse_info_serverside_ocean ($) {
my ($oceanname) = @_;
die "unknown ocean $oceanname ?" unless exists $oceans{$oceanname};