X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_route;h=8b491d93a99aca47c41b8a77306648c10975acf1;hp=0f9447ac307df6c4f583fb5aed18b1f0221e04f7;hb=422fab9f34f08090bca02f67cb41bba31f816c7e;hpb=18bdd63163d8af1276eb26a67ccc6e78a1f7c158 diff --git a/yarrg/web/query_route b/yarrg/web/query_route index 0f9447a..8b491d9 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -81,10 +81,12 @@ Enter route (islands, or archipelagoes, separated by |s or commas; <&| qtextstring, qa => $qa, dbh => $dbh, thingstring => 'routestring', emsgstore => \$emsg, - perresult => sub { - my ($canonname, $island, $arch) = @_; - push @islandids, $island; - push @archipelagoes, defined $island ? undef : $arch; + onresults => sub { + foreach (@_) { + my ($canonname, $island, $arch) = @$_; + push @islandids, $island; + push @archipelagoes, defined $island ? undef : $arch; + } } &> size=80 @@ -100,9 +102,7 @@ Vessel or capacity: <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs', thingstring => 'capacitystring', emsgstore => \$emsg, helpref => 'capacity', - perresult => sub { - ($max_mass,$max_volume) = @_; - } + onresults => sub { ($max_mass,$max_volume) = @_; } &> size=40 @@ -117,7 +117,7 @@ Expected losses: <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'll', thingstring => 'lossperleague', emsgstore => \$emsg, helpref => 'losses', - perresult => sub { ($lossperleaguepct)= @_; } + onresults => sub { ($lossperleaguepct)= @_; } &> size=9 @@ -129,7 +129,7 @@ Expected losses: <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac', thingstring => 'capitalstring', emsgstore => \$emsg, helpref => 'capital', - perresult => sub { ($capital)= @_; } + onresults => sub { ($capital)= @_; } &> size=9