manwar / Map-Tube-Plugin-Graph

Graph plugin for Map::Tube.
Artistic License 2.0
1 stars 2 forks source link

Use of uninitialized value in anonymous hash ({}) at C:/Strawberry/perl/site/lib/Map/Tube/Plugin/Graph.pm line 133. #4

Open gwselke opened 4 days ago

gwselke commented 4 days ago

map-tube --map=Berlin --generate_map produces a proper map image (as far as I can tell), but it issues also the above warning. The same happens for NYC and Singapore

The same warning is issued for other maps, too, but with worse consequences: Nanjing, NizhnyNovgorod, Novosibirsk, and Tbilisi exhibit the same warning but also produce empty maps. (More exactly: they produce images that contain only the header line but no map.)

manwar commented 1 day ago

@gwselke Thank you for your efforts.

As far as Berlin map is concerned, I clearly see issue in the map data. Unfortunately the current test doesn't catch the issue. I found nodes having invalid line id. This should have been picked right at the beginning.

manwar commented 1 day ago

@gwselke Just to let you know, I have released patch to handle the invalid station line id.

https://metacpan.org/release/MANWAR/Map-Tube-3.81

gwselke commented 15 hours ago

That is a good thing! It's very easy, in fact, to get some detail wrong in a map, so it is a great help to have these caught by the Map::Tube infrastructure.