Map::Tube::Beijing - Interface to the Beijing tube map
use Map::Tube::Beijing; my $tube = Map::Tube::Beijing->new(); my $route = $tube->get_shortest_route('Yonghegong', 'Chongwenmen'); print "Route: $route\n";
This module allows to find the shortest route between any two given tube stations in Beijing. All interesting methods are provided by the role Map::Tube.
use Map::Tube::Beijing; my $tube_chin = Map::Tube::Beijing->new(); my $tube_pinyin = Map::Tube::Beijing->new( nametype => 'alt' );
This will read the tube information from the shared file beijing-map.xml, which is part of the distribution. Without argument, full Chinese characters (simplified) will be used. With the value
nametype, pinyin transliteration into Western characters will be used. Other values will throw an error.
If something goes wrong, maybe because the map information file was corrupted, the constructor will die.
Gisbert W. Selke, TapirSoft Selke & Selke GbR.
The data for the XML file were mainly taken from the appropriate Wikipedia pages. They are CC BY-SA 2.0. The module itself is free software; you may redistribute and/or modify it under the same terms as Perl itself.