Skip Menu |
 

This queue is for tickets about the Graph-Easy CPAN distribution.

Report information
The Basics
Id: 96994
Status: new
Priority: 0/
Queue: Graph-Easy

People
Owner: Nobody in particular
Requestors: liuyb [...] yahoo-inc.com
Cc:
AdminCc:

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



Subject: Graph::Easy::Group->add_group() always add child group to root graph instead of only current group
Date: Sun, 6 Jul 2014 05:39:11 -0700
To: "bug-Graph-Easy [...] rt.cpan.org" <bug-Graph-Easy [...] rt.cpan.org>
From: Yubao Liu <liuyb [...] yahoo-inc.com>
Download (untitled) / with headers
text/plain 832b
Without the two "del_group()",  the node "world" will be added into sub group "xx.a". I'm using Graph-Easy 0.75,  I feel line 374 is buggy: https://metacpan.org/source/SHLOMIF/Graph-Easy-0.75/lib/Graph/Easy/Group.pm#L372     # group with that name doesn't exist, so create new one 374: $group = $self->{graph}->add_group($name) unless ref $group;     # index under the group name for easier lookup     $self->{groups}->{ $group->{name} } = $group; #!/usr/bin/perl use Graph::Easy; use strict; use warnings; my $graph = Graph::Easy->new; my $xx = $graph->add_group("xx"); my $a1 = $xx->add_group("a"); #$graph->del_group($a1); my $yy = $graph->add_group("yy"); my $a2 = $yy->add_group("a"); #$graph->del_group($a2); $a1->add_node("hello"); $a2->add_node("world"); print $graph->as_graphviz; Regards, Yubao Liu


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.