NAME Map::Tube::Text::Table - Table output for Map::Tube. SYNOPSIS use Map::Tube::Text::Table; my $obj = Map::Tube::Text::Table->new(%params); my $text = $obj->junctions; my $text = $obj->line($line); my $text = $obj->print; METHODS "new(%params)" Constructor. * "tube" Map::Tube object. It is required. Default value is undef. "junctions()" Print junctions. Returns string with unicode text table. "line($line)" Print line. Returns string with unicode text table. "print()" Print all (junctions + all lines). Returns string with unicode text table. ERRORS new(): Parameter 'tube' is required. Parameter 'tube' must be 'Map::Tube' object. From Class::Utils::set_params(): Unknown parameter '%s'. EXAMPLE # Pragmas. use strict; use warnings; # Modules. use Encode qw(encode_utf8); use English; use Error::Pure qw(err); use Map::Tube::Text::Table; # Error::Pure environment. $ENV{'ERROR_PURE'} = 'AllError'; # Arguments. if (@ARGV < 1) { print STDERR "Usage: $0 metro\n"; exit 1; } my $metro = $ARGV[0]; # 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; } # GraphViz object. my $table = Map::Tube::Text::Table->new( 'tube' => $tube, ); # Print out. print encode_utf8($table->print); # Output without arguments like: # Usage: /tmp/SZXfa2g154 metro # Output with 'Tbilisi' argument like: # ��𢞖������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ # �� Junctions �� # ��鎿������������������������������������𥈡�������������������������������������������������������������������������������������𥈡�������������������������������������������������������������������������𤧅 # �� Station �� Line �� Connected to �� # ��鎿������������������������������������䃈�������������������������������������������������������������������������������������䃈�������������������������������������������������������������������������𤧅 # �� �﹥�靟�𣞢�𠯆�€���嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇�� �� �靟�桑�𧘲�竢�S�竢�𠹳��-�鐧�靟���䟭�竢�䤾�嘣�𠹳�嘣�� �桑�靟�𥕝��,�﹥�靟�𤒹�€���䤾�靟�𠹳�鍅�� �桑�靟�𥕝�� �� �𧘲�靟���脊�靟�𦸇�嘣�兕�鐧�嘣�𠹳��, �𦸇�靟�後�靟�𠹳�靟�𣞢�竢�鐧��, �矜�竢���竢�䤾�竢�𠹳�� �� # ��婙������������������������������������𣞁�������������������������������������������������������������������������������������𣞁��������������������������������������������������������������������������� # ��𢞖������������������������������������������������������������������������������������������������������������������������ # �� Line '�靟�桑�𧘲�竢�S�竢�𠹳��-�鐧�靟���䟭�竢�䤾�嘣�𠹳�嘣�� �桑�靟�𥕝��' �� # ��鎿��������������������������������������������𥈡�������������������������������������������������������������������������𤧅 # �� Station �� Connected to �� # ��鎿��������������������������������������������䃈�������������������������������������������������������������������������𤧅 # �� �靟�桑�𧘲�竢�S�竢�𠹳�嘣�� �䤾�竢�靟�S���� �� �﹥�靟���靟�脊�嘣�兕�鐧�嘣�𠹳�� �� # �� �﹥�靟���靟�脊�嘣�兕�鐧�嘣�𠹳�� �� �靟�桑�𧘲�竢�S�竢�𠹳�嘣�� �䤾�竢�靟�S����, �𠯆�€���靟�𧘲�嘣�兕�鐧�嘣�𠹳�� �� # �� �𠯆�€���靟�𧘲�嘣�兕�鐧�嘣�𠹳�� �� �﹥�靟���靟�脊�嘣�兕�鐧�嘣�𠹳��, �艮���𧘲�靟�艮�竢�𠹳�� �� # �� �艮���𧘲�靟�艮�竢�𠹳�� �� �𠯆�€���靟�𧘲�嘣�兕�鐧�嘣�𠹳��, �𣞢�嘣�𣞢�€�𤒹�� �� # �� �𣞢�嘣�𣞢�€�𤒹�� �� �𠯆�鍅�花�嘣���嘣�後��, �艮���𧘲�靟�艮�竢�𠹳�� �� # �� �𠯆�鍅�花�嘣���嘣�後�� �� �𣞢�嘣�𣞢�€�𤒹��, �𦸇�靟�後�靟�𠹳�靟�𣞢�竢�鐧�� �� # �� �𦸇�靟�後�靟�𠹳�靟�𣞢�竢�鐧�� �� �𠯆�鍅�花�嘣���嘣�後��, �﹥�靟�𣞢�𠯆�€���嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇�� �� # �� �𧘲�靟���脊�靟�𦸇�嘣�兕�鐧�嘣�𠹳�� �� ���€�﹥�䤾�靟�鐧�竢�𠹳��, �﹥�靟�𣞢�𠯆�€���嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇�� �� # �� ���€�﹥�䤾�靟�鐧�竢�𠹳�� �� �䤾�靟�鐧�嘣�﹥�€�戶�𠹳�竢�𤒹�嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇��, �𧘲�靟���脊�靟�𦸇�嘣�兕�鐧�嘣�𠹳�� �� # �� �䤾�靟�鐧�嘣�﹥�€�戶�𠹳�竢�𤒹�嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇�� �� �靟�鐧�𠹳�靟�𤒹�靟����, ���€�﹥�䤾�靟�鐧�竢�𠹳�� �� # �� �靟�鐧�𠹳�靟�𤒹�靟���� �� 300 �靟���靟�𠯆�鐧�竢�𠹳��, �䤾�靟�鐧�嘣�﹥�€�戶�𠹳�竢�𤒹�嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇�� �� # �� 300 �靟���靟�𠯆�鐧�竢�𠹳�� �� �靟�鐧�𠹳�靟�𤒹�靟����, �嘣�﹥�靟�𦸇�� �� # �� �嘣�﹥�靟�𦸇�� �� 300 �靟���靟�𠯆�鐧�竢�𠹳��, �﹥�靟�𧘲�𠯆�鍅���� �� # �� �﹥�靟�𧘲�𠯆�鍅���� �� �鐧�靟���䟭�竢�䤾�嘣�𠹳��, �嘣�﹥�靟�𦸇�� �� # �� �鐧�靟���䟭�竢�䤾�嘣�𠹳�� �� �﹥�靟�𧘲�𠯆�鍅���� �� # �� �﹥�靟�𣞢�𠯆�€���嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇�� �� �𧘲�靟���脊�靟�𦸇�嘣�兕�鐧�嘣�𠹳��, �𦸇�靟�後�靟�𠹳�靟�𣞢�竢�鐧��, �矜�竢���竢�䤾�竢�𠹳�� �� # ��婙��������������������������������������������𣞁��������������������������������������������������������������������������� # ��𢞖������������������������������������������������������������������������������������������������������������������������������������������ # �� Line '�﹥�靟�𤒹�€���䤾�靟�𠹳�鍅�� �桑�靟�𥕝��' �� # ��鎿��������������������������������������������������𥈡�������������������������������������������������������������������������������������𤧅 # �� Station �� Connected to �� # ��鎿��������������������������������������������������䃈�������������������������������������������������������������������������������������𤧅 # �� �矜�竢���竢�䤾�竢�𠹳�� �� �﹥�靟�𣞢�𠯆�€���嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇��, �S�竢�丟�𦸇�嘣�䟭�€���� �€�𦸇�嘣�鐧�竢���﹥�嘣�S�竢�S�� �� # �� �S�竢�丟�𦸇�嘣�䟭�€���� �€�𦸇�嘣�鐧�竢���﹥�嘣�S�竢�S�� �� �﹥�靟�𧘲�竢�𣞢�嘣�花�嘣�𦸇�� �€�𦸇�嘣�鐧�竢���﹥�嘣�S�竢�S��, �矜�竢���竢�䤾�竢�𠹳�� �� # �� �﹥�靟�𧘲�竢�𣞢�嘣�花�嘣�𦸇�� �€�𦸇�嘣�鐧�竢���﹥�嘣�S�竢�S�� �� �𣞢�竢�𠹳�嘣�﹥��, �S�竢�丟�𦸇�嘣�䟭�€���� �€�𦸇�嘣�鐧�竢���﹥�嘣�S�竢�S�� �� # �� �𣞢�竢�𠹳�嘣�﹥�� �� �鐧�靟�骺��-�戶�兕�靟�鐧�竢�𠹳��, �﹥�靟�𧘲�竢�𣞢�嘣�花�嘣�𦸇�� �€�𦸇�嘣�鐧�竢���﹥�嘣�S�竢�S�� �� # �� �鐧�靟�骺��-�戶�兕�靟�鐧�竢�𠹳�� �� �𣞢�竢�𠹳�嘣�﹥�� �� # �� �﹥�靟�𣞢�𠯆�€���嘣�� �𧘲�鍅�竢�𣞢�靟�𦸇�� �� �𧘲�靟���脊�靟�𦸇�嘣�兕�鐧�嘣�𠹳��, �𦸇�靟�後�靟�𠹳�靟�𣞢�竢�鐧��, �矜�竢���竢�䤾�竢�𠹳�� �� # ��婙��������������������������������������������������𣞁��������������������������������������������������������������������������������������� DEPENDENCIES Class::Utils, Error::Pure, Map::Tube::Text::Table::Utils, Readonly, Scalar::Util. SEE ALSO Map::Tube, Map::Tube::GraphViz. REPOSITORY <https://github.com/tupinek/Map-Tube-Text-Table> AUTHOR Michal �麖a�嶤k <mailto:skim@cpan.org> <http://skim.cz> LICENSE AND COPYRIGHT 穢 2014 Michal �麖a�嶤k Artistic License BSD 2-Clause License VERSION 0.02