NAME

XML::MiniCity

SYNOPSIS

my $city = new XML::MiniCity('mycity');
die unless $city->update;

print $city->host, "\n";
print $city->unemployment, "\n";
print $city->transport, "\n";
# ...

DESCRIPTION

This is simple module to access the data of a city on myminicity.com. It fetches the XML data file of a given city and provides them via simple accessor methods.

METHODS

new($cityname)

Creates a new city object. The parameter should be host part of your city URL, for example if your city is at 'http://dokuleser.myminicity.com', then you would use 'dokuleser' as city name.

update

This method requests the XML data from the server. It returns a true value on success, undef on error.

host
name
region
ranking
population
incomes
unemployment
transport
criminality
pollution
nextnuke
signatures

These are the accessor methods for XML nodes. Only getting, no setting.

COPYRIGHT

Copyright (C) 2008 by Jonas Kramer <jkramer@cpan.org>. Published under the terms of the Artistic License 2.0.