Mercurial > eagle-eye
comparison enemy.pl @ 8:e4b3168d0319
implemented sheep and enemy scripts.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Wed, 08 Oct 2008 04:23:01 +0800 |
parents | |
children | fd44e3a1f800 |
comparison
equal
deleted
inserted
replaced
7:2040ccc95670 | 8:e4b3168d0319 |
---|---|
1 #!/usr/bin/perl | |
2 use strict; | |
3 use Ikariam; | |
4 use Data::Dumper; | |
5 | |
6 package main; | |
7 | |
8 if($#ARGV != 0) { | |
9 die("Usage: $0 nickname\n"); | |
10 } | |
11 | |
12 Ikariam::User->has_many(cities => 'Ikariam::Cities'); | |
13 my ($u) = Ikariam::User->search('name' => $ARGV[0]); | |
14 if(defined($u)) { | |
15 print Dumper($u->_data_hash); | |
16 foreach my $c ($u->cities) { | |
17 print Dumper($c->_data_hash); | |
18 } | |
19 } |