Skip Menu |

This queue is for tickets about the Map-Tube CPAN distribution.

Report information
The Basics
Id: 107737
Status: resolved
Priority: 0/
Queue: Map-Tube

People
Owner: MANWAR [...] cpan.org
Requestors: SKIM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 3.03



Subject: Warning in Map::Tube->get_lines()
Hi, Another warnings from my test. Test example is in attachment. Test cause this output: pepa:~/perl_modules/Map-Tube/Map-Tube-Bucharest/t/Map-Tube-Bucharest> perl 10-get_stations.t 1..5 ok 1 - Missing line name. not ok 2 - no warnings # Failed test 'no warnings' # at /usr/local/share/perl/5.20.2/Test/NoWarnings.pm line 45. # There were 1 warning(s) # Previous test 0 '' # Use of uninitialized value $line in uc at /usr/local/share/perl/5.20.2/Map/Tube.pm line 308. # at /usr/local/share/perl/5.20.2/Map/Tube.pm line 308. # Map::Tube::get_stations(Map::Tube::Bucharest__WITH__Map::Tube::Plugin::Formatter__WITH__Map::Tube::Plugin::FuzzyFind__WITH__Map::Tube::Plugin::Graph=HASH(0x2330268)) called at 10-get_stations.t line 14 # eval {...} called at 10-get_stations.t line 13 # # Looks like you planned 5 tests but ran 2. # Looks like you failed 1 test of 2 run. Kind regards, Michal
Subject: 10-get_stations.t
# Pragmas. use strict; use warnings; # Modules. use English; use Map::Tube::Bucharest; use Test::More tests => 5; use Test::NoWarnings; # Test. my $map = Map::Tube::Bucharest->new; eval { $map->get_stations; }; like($EVAL_ERROR, qr/ERROR: Missing Line name./, 'Missing line name.');
Hi, Thanks for reporting the issue. As per the documentation method get_stations() expect one required parameter i.e. line name. In your example code, the line name is missing. However, I should have checked the line name before applying uc(). In my opinion, this is not a bug. Best Regards, Mohammad S Anwar
Dne Út 13.říj.2015 07:44:05, MANWAR napsal(a): Hi, Show quoted text
> Thanks for reporting the issue. > As per the documentation method get_stations() expect one required > parameter i.e. line name. In your example code, the line name is > missing. > > However, I should have checked the line name before applying uc(). > > In my opinion, this is not a bug.
ok, then you can add error for situation, when no line name present. As in other methods like get_node_by_id() you have. Regards, M.
Hi , This has been patched in Map::Tube v3.03. https://metacpan.org/release/MANWAR/Map-Tube-3.03 https://github.com/Manwar/Map-Tube/commits?author=Manwar Best Regards, Mohammad S Anwar
Dne Út 13.říj.2015 08:07:09, MANWAR napsal(a): Hi, Show quoted text
> This has been patched in Map::Tube v3.03.
Thanks, that's fixed. M.