# sponsored by Three Rings.
use strict (qw(vars));
-use LWP::UserAgent;
use JSON;
#use Data::Dumper;
use IO::File;
$which =~ s/\W//g;
our ($pctb) = $ENV{'YPPSC_YARRG_PCTB'};
-our ($ua)= LWP::UserAgent->new;
+our ($ua)= http_useragent("database_info_fetch $which");
our $jsonresp;
sub jparsetable ($$) {
sub { });
for_commods(sub {
my ($commod)= @_;
- my $srcs= $commods{$commod};
+ my $srcs= $commods{$commod}{Srcs};
compare_sources_one($srcs, "commodity $commod");
});
}
sub main__island () {
my $ocean= get_ocean();
- parse_info_clientside();
- get_arches_islands_pctb($ocean);
+ parse_info_clientside() if $ENV{'YPPSC_YARRG_YARRG'};
+ get_arches_islands_pctb($ocean) if $pctb;
for_islands($ocean,
sub {
});
}
+sub main__timestamp () {
+ my %o;
+ $o{'requesttimestamp'}= '1';
+ my $respcontent= yarrgpostform($ua, \%o);
+ $respcontent =~ m/^OK ([1-9]\d{1,20})\./ or die "$respcontent ?";
+ print "$1\n";
+ exit(0);
+}
+
+sub main__yarrgversion () {
+ printf "%s\n", version_core();
+}
+
+sub main__useragentstringmap ($$) {
+ printf "%s\n", http_useragent_string_map($_[0], $_[1]);
+}
+
sub main__sunshinewidget () {
print <<END
Land {On land} {