NAME
Map::Tube::Copenhagen - Interface to the Copenhagen Metro map VERSION
Version 0.01 DESCRIPTION
It currently provides functionality to find the shortest route between the two given stations. It covers the two (and only) metro lines: M1 and M2. CONSTRUCTOR
The constructor DO NOT expects parameters.This setup the default node definitions. use strict; use warnings; use Map::Tube::Copenhagen; my $tube = Map::Tube::Copenhagen->new; METHODS
get_shortest_route($from, $to)
It expects C<$from> and C<$to> station name, required param. It returns an object of type L. On error it throws exception of type L. use strict; use warnings; use Map::Tube::Copenhagen; my $tube = Map::Tube::Copenhagen->new; my $route = $tube->get_shortest_route('Flintholm', 'Kastrup'); print "Route: $route\n";; as_image($line_name)
It expects the plugin L to be installed. Returns line image as base64 encoded string if C<$line_name> passed in otherwise it returns base64 encoded string of the entire map. use strict; use warnings; use MIME::Base64; use Map::Tube::Copenhagen; my $tube = Map::Tube::Copenhagen->new; my $map = $tube->name; open(my $IMAGE, ">$map.png"); binmode($IMAGE); print $IMAGE decode_base64($tube->as_image); close($IMAGE); AUTHOR
Søren Lund, C<< >> BUGS
Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN