Skip Menu |

This queue is for tickets about the Graph CPAN distribution.

Report information
The Basics
Id: 9461
Status: resolved
Priority: 0/
Queue: Graph

People
Owner: Nobody in particular
Requestors: alansz [...] uic.edu
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.50
Fixed in: (no value)



Subject: successors() fails without stringify()
Using Graph 0.50 on perl 5.8.4 built for i386-linux-thread-multi, on Linux 2.4.18-1-686 (Debian woody) I have not been able to make a nice clean test case to reproduce this problem, but I have a complex script which produces different output from $graph->successors() depending on whether $graph->stringify() has been run first or not; when it has not been run first, successors() returns undefined, as illustrated in this output from the perl debugger stepping through the script. Here is the relevant part of the script: print "think Linking Rooms\n"; #$graph->stringify; # Fix for Graph 0.50 bug? foreach (@rooms) { print "\@tel [v($base$r{$_})]\n"; # Open all exits leading from the room foreach $neighbor ($graph->successors($_)) { $exit = $graph->get_edge_attribute($_,$neighbor,'label'); With $graph->stringify commented out, the script does not produce all the successors. Here's what perl -d shows just before the foreach $neighbor line: DB<3> p $_ Town Square DB<4> p $graph->successors($_) DB<5> p $graph City Gates-Town Square,Main Street-Sewer,Main Street-Town Square,Town Square-Cit y Gates,Town Square-Main Street DB<6> p $graph->successors($_) Main StreetCity Gates Something is being done in stringify that affects the graph beyond just returning a string rendering, I think (or something isn't being done in successor that needs to be?) Best, Alan
I'm afraid I still have to ask for a way to reproduce the problem since I cannot see any obvious way how stringify() and successors() would be connected. The sample code does not need to "small" as in "10 lines or less", as long as it is a reasonably self-contained piece of code.
Resolved (with one my weirdest fixes ever) in Graph 0.52.