NAME
Map::Tube::Chicago - Interface to the Chicago L system map
SYNOPSIS
use Map::Tube::Chicago;
my $tube = Map::Tube::Chicago->new();
my $route = $tube->get_shortest_route( 'Fullerton', 'Library');
print "Route: $route\n";
DESCRIPTION
This module allows to find the shortest route between any two given tube or tram stations in Chicago. All interesting methods are provided by the role Map::Tube. Since many stations in Chicago haaving the same name are in fact different stations, this module disambiguates the names by attaching (A), (B) etc. This also applies to stations of the same name where an interchange is possible but requires a walk checking out from one station and checking in at another (of the same name).
METHODS
CONSTRUCTOR
use Map::Tube::Chicago;
my $tube = Map::Tube::Chicago->new();
The only argument, xml
, is optional; if specified, it should be a code ref to a function that returns either the path the XML map file, or a string containing this XML content. The default is the path to chicago-map.xml that is a part of this distribution. For further information see Map::Tube.
xml()
This read-only accessor returns whatever was specified as the XML source at construction.
ERRORS
If something goes wrong, maybe because the map information file was corrupted, the constructor will die.
AUTHOR
Gisbert W. Selke, TapirSoft Selke & Selke GbR.
COPYRIGHT AND LICENCE
The data for the XML file were taken from https://en.wikipedia.org/wiki/Chicago_%22L%22 and some pages linked from there. The module itself is free software; you may redistribute and/or modify it under the same terms as Perl itself.