comparison spy.pl @ 298:b3b845d30d4b

new cache mechanism
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sun, 07 Dec 2008 16:40:04 +0800
parents 10f14db31151
children ff8db948e1a1
comparison
equal deleted inserted replaced
297:073442284ec1 298:b3b845d30d4b
9 our $i = new Ikariam($::server, $::user, $::pass); 9 our $i = new Ikariam($::server, $::user, $::pass);
10 $i->login; 10 $i->login;
11 # $i->check(); 11 # $i->check();
12 foreach (glob("city-*-dump.yaml")) { 12 foreach (glob("city-*-dump.yaml")) {
13 my $city = LoadFile($_); 13 my $city = LoadFile($_);
14 $i->{'cities'}->{$city->{id}} = $city; 14 # $i->{'cities'}->{$city->{id}} = $city;
15
16 my $spydata = $i->checkSafeHouse($city->{id}); 15 my $spydata = $i->checkSafeHouse($city->{id});
17 foreach (keys(%{$spydata})) { 16 foreach (keys(%{$spydata})) {
18 DumpFile("spy-$_-dump.yaml", $spydata->{$_}); 17 DumpFile("spy-$_-dump.yaml", $spydata->{$_});
19 } 18 }
20 } 19 }