NAME
    Map::Tube::Text::Shortest - Shortest route information via Map::Tube
    object.

SYNOPSIS
     use Map::Tube::Test::Shortest;
     my $obj = Map::Tube::Text::Shortest->new;
     print $obj->print($from, $to);

METHODS
    "new()"
             Constructor.

            *       "tube"

                     Map::Tube object.
                     Parameter is required.
                     Default value is undef.

    print($from, $to)>
             Print shortest route table.
             Returns string with table.

ERRORS
     new():
             Parameter 'tube' is required.
             Parameter 'tube' must be 'Map::Tube' object.

EXAMPLE
     # Pragmas.
     use strict;
     use warnings;

     # Modules.
     use English;
     use Encode qw(decode_utf8 encode_utf8);
     use Error::Pure qw(err);
     use Map::Tube::Text::Shortest;

     # Arguments.
     if (@ARGV < 3) {
             print STDERR "Usage: $0 metro from to\n";
             exit 1;
     }
     my $metro = $ARGV[0];
     my $from = decode_utf8($ARGV[1]);
     my $to = decode_utf8($ARGV[2]);

     # Load metro object.
     my $class = 'Map::Tube::'.$metro;
     eval "require $class;";
     if ($EVAL_ERROR) {
             err "Cannot load '$class' class.",
                     'Error', $EVAL_ERROR;
     }

     # Metro object. 
     my $tube = eval "$class->new";
     if ($EVAL_ERROR) {
             err "Cannot create object for '$class' class.",
                     'Error', $EVAL_ERROR;
     }

     # Table object.
     my $table = Map::Tube::Text::Shortest->new(
             'tube' => $tube,
     );
 
     # Print out.
     print encode_utf8(scalar $table->print($from, $to))."\n";

     # Output without arguments like:
     # Usage: /tmp/O0s_2qtAuB metro from to

     # Output with 'Budapest', 'F�𪆫獺m t矇r', 'Opera' arguments like:
     # 
     # From F�𪆫獺m t矇r to Opera
     # =======================
     # 
     # -- Route 1 (cost ?) ----------
     # [   M4 ] F�𪆫獺m t矇r
     # [   M3 ] K獺lvin t矇r
     # [ * M4 ] K獺lvin t矇r
     # [   M3 ] Ferenciek tere
     # [   M1 ] De獺k Ferenc t矇r
     # [ * M2 ] De獺k Ferenc t矇r
     # [   M3 ] De獺k Ferenc t矇r
     # [   M1 ] Bajcsy-Zsilinszky 繳t
     # [   M1 ] Opera
     # 
     # M1  Linia M1
     # M3  Linia M3
     # M2  Linia M2
     # M4  Linia M4
     # 
     # *: Transfer to other line
     # +: Transfer to other station
     #

DEPENDENCIES
    Class::Utils, Error::Pure, List::Util, Readonly, Scalar::Util.

SEE ALSO
    Map::Tube, Map::Tube::Graph, Map::Tube::GraphViz,
    Map::Tube::Plugin::Graph, Map::Tube::Text::Table, Task::Map::Tube.

REPOSITORY
    <https://github.com/tupinek/Map-Tube-Text-Shortest>

AUTHOR
    Michal �麖a�嶤k <mailto:skim@cpan.org>

    <http://skim.cz>

LICENSE AND COPYRIGHT
     穢 2014-2015 Michal �麖a�嶤k
     Artistic License
     BSD 2-Clause License

VERSION
    0.01