view spy.pl @ 300:5fc26f2af95b

merged.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sun, 07 Dec 2008 21:13:21 +0800
parents b3b845d30d4b
children ff8db948e1a1
line wrap: on
line source

#!/usr/bin/perl

use strict;
use Ikariam;
use Data::Dumper;
use Decision::ParseTree q{ParseTree};
use YAML qw/LoadFile Dump DumpFile/;

our $i = new Ikariam($::server, $::user, $::pass);
$i->login;
# $i->check();
foreach (glob("city-*-dump.yaml")) {
    my $city = LoadFile($_);
    # $i->{'cities'}->{$city->{id}} = $city;
    my $spydata = $i->checkSafeHouse($city->{id});
    foreach (keys(%{$spydata})) {
        DumpFile("spy-$_-dump.yaml", $spydata->{$_});
    }
}
$i->logout;