diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/enemy.pl	Wed Oct 08 04:23:01 2008 +0800
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+use strict;
+use Ikariam;
+use Data::Dumper;
+
+package main;
+
+if($#ARGV != 0) {
+    die("Usage: $0 nickname\n");
+}
+
+Ikariam::User->has_many(cities => 'Ikariam::Cities');
+my ($u) = Ikariam::User->search('name' => $ARGV[0]);
+if(defined($u)) {
+    print Dumper($u->_data_hash);
+    foreach my $c ($u->cities) {
+        print Dumper($c->_data_hash);
+    }
+}