Skip Menu |

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

Report information
The Basics
Id: 101970
Status: new
Priority: 0/
Queue: Graph-XGMML

People
Owner: Nobody in particular
Requestors: DUFFEE [...] cpan.org
Cc:
AdminCc:

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



Subject: add nodes with labels
Two bugs in adding nodes: 1) if Graph::XGMML->new is called without OUTPUT, a call to add_node dies with Can't call method "startTag" on an undefined value at /usr/local/share/perl5/Graph/XGMML.pm line 160. 2) $graph2->add_node('bar', label => 'free') dies with Two attributes named "label" at /usr/local/share/perl5/Graph/XGMML.pm line 160. According to the documentation, these two features should work and the test suite passes, of course. system: perl v5.16.3 built for x86_64-linux-thread-multi Fedora core 19 Linux 3.14.23-100.fc19.x86_64 I've moved on. With the module being 6 years old, I don't know if you've moved on, too.
Subject: add_label.t
use 5.008005; use Graph::XGMML (); my $output = ''; my $graph1 = Graph::XGMML->new( directed => 1, ); my $graph2 = Graph::XGMML->new( directed => 1, OUTPUT => \$output, NEWLINES => 1, ); eval { $graph1->add_node('foo') }; if ($@) { warn "Error adding node to graph1: \n\t", $@; } else { print "Added a node called foo\n"; } eval { $graph2->add_node('bar', label => 'free') }; if ($@) { warn "Error adding node with a label to graph2: \n\t", $@; } else { print "Added a node called bar with label free\n"; } eval { $graph2->add_node('one') }; if ($@) { warn "Error adding node to graph2: \n\t", $@; } else { print "Successfully added a node called one to graph2\n"; } print "Finished\n";