<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Map::Tube::Text::Shortest - Shortest route information via Map::Tube
    object.

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

METHODS
    "new()"
             Constructor.

            *       "tube"

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

    print($from, $to)&gt;
             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 &lt; 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-&gt;new";
     if ($EVAL_ERROR) {
             err "Cannot create object for '$class' class.",
                     'Error', $EVAL_ERROR;
     }

     # Table object.
     my $table = Map::Tube::Text::Shortest-&gt;new(
             'tube' =&gt; $tube,
     );
 
     # Print out.
     print encode_utf8(scalar $table-&gt;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
    &lt;https://github.com/tupinek/Map-Tube-Text-Shortest&gt;

AUTHOR
    Michal ﾅ�paﾄ稿k &lt;mailto:skim@cpan.org&gt;

    &lt;http://skim.cz&gt;

LICENSE AND COPYRIGHT
     ﾂｩ 2014-2015 Michal ﾅ�paﾄ稿k
     Artistic License
     BSD 2-Clause License

VERSION
    0.01

</pre></body></html>