Map::Tube::Node - Defines the node for Map::Tube
Version 2.05
Map::Tube has been granted the "Famous Software Award" by Download.FamousWhy.com on Tue 09 Nov 2010.
http://download.famouswhy.com/map_tube/
B -------- C / \ / \ / \ / \ / \ / \ A ------ G ------- D \ / \ / \ / \ / \ / \ / F -------- E / / / H \ \ \ I which can be defined as below: { 'A' => ['B','F','G'], 'B' => ['A','C','G'], 'C' => ['B','D','G'], 'D' => ['C','E','G'], 'E' => ['D','F','G'], 'F' => ['A','E','G','H'], 'G' => ['A','B','C','D','E','F'], 'H' => ['F','I'], 'I' => ['H'] }
This is the core method of the module, where we actually define the relationship among the diffrerent nodes. I have taken extra care to depict the relationship. However I would be more than happy to receieve any suggestion to improve the logic. Please note "Transport for London" is the owner of the data used here.
use strict; use warnings; use Map::Tube::Node; use strict; use warnings; # Loads up the default node mapping definitions. my $node = Map::Tube::Node::init();
This loads all the nodes defined. It covers Bakerloo, Central, Circle, District, DLR, Hammersmith & City, Jubilee, Metropolitan, Northern, Overground, Piccadilly, Victoria and Waterloo & City. Please note this is still very experimental in nature.
use strict; use warnings; use Map::Tube::Node; # Loads all the node definitions. my $element = Map::Tube::Node::load_element();
This loads all the tube lines with their node code.
use strict; use warnings; use Map::Tube::Node; # Loads all the node codes with the default tube lines information. my $line = Map::Tube::Node::load_line();
This loads all the nodes with name in uppercase. This is to allow case-insensitive name lookup. User can also provide the node list otherwise it will pick the default list.
use strict; use warnings; use Map::Tube::Node; # Returns a new list of element with names in upper case. my $upcase = Map::Tube::Node::upcase_element_name();
Mohammad S Anwar, <mohammad.anwar@yahoo.com>
<mohammad.anwar@yahoo.com>
Please report any bugs or feature requests to bug-map-tube@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Map-Tube. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-map-tube@rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Map::Tube::Node
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Map-Tube
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Map-Tube
CPAN Ratings
http://cpanratings.perl.org/d/Map-Tube
Search CPAN
http://search.cpan.org/dist/Map-Tube/
Copyright 2010 Mohammad S Anwar.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Map::Tube, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Map::Tube
CPAN shell
perl -MCPAN -e shell install Map::Tube
For more information on module installation, please visit the detailed CPAN module installation guide.