The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Map::Tube::Hongkong - interface to the Hongkong MTR map.

VERSION

version 0.03

DESCRIPTION

It currently provides functionality to find the shortest route between the two given stations.

CONSTRUCTOR

    use Map::Tube::Hongkong;
    my $tube = Map::Tube::Hongkong->new;

METHODS

get_shortest_route(START, END)

This method expects two parameters START and END station name. Station names are case insensitive. The station sequence from START to END is returned. use Map::Tube::Hongkong; my $tube = Map::Tube::Hongkong->new; my $route = $tube->get_shortest_route('Yau Ma Tei', 'Mei Foo'); print "Route: $route\n";

BUGS/TODOS

The script has not yet optimize to reduce the number of line transitions. For example, normally, the quickest route from Kowloon Tong to Yau Ma Tei is simply travelled through the Kwun Tong Line. However, the current script displays the following suggestion:

1. Kowloon Tong (East Rail Line, Kwun Tong Line),
2. Mong Kok East (East Rail Line),
3. Hung Hom (East Rail Line, Tuen Ma Line),
4. Ho Man Tin (Kwun Tong Line, Tuen Ma Line),
5. Yau Ma Tei (Kwun Tong Line, Tsuen Wan Line).

If you ask the reverse - its suggestion of how to get from Yau Ma Tei to Kowloon Tong, the script gives a reasonable suggestion:

1. Yau Ma Tei (Kwun Tong Line, Tsuen Wan Line),
2. Mong Kok (Kwun Tong Line, Tsuen Wan Line),
3. Prince Edward (Kwun Tong Line, Tsuen Wan Line),
4. Shek Kip Mei (Kwun Tong Line),
5. Kowloon Tong (East Rail Line, Kwun Tong Line).

SEE ALSO

Map::Tube.

REPOSITORY

https://github.com/E7-87-83/Map-Tube-Hongkong

AUTHOR

FUNG Cheok Yin <fungcheokyin@gmail.com>

CONTRIBUTORS

Mohammad S Anwar <mohammad.anwar@yahoo.com>

FUNG Cheok Yin <fungcheokyin@gmail.com>

COPYRIGHT AND LICENSE

This is free software, licensed under: The Artistic License 2.0 (GPL Compatible)