Subject: | GraphViz2::Parse::ISA when no graph given |
Date: | Wed, 10 May 2017 19:16:53 +1000 |
To: | bug-GraphViz2 [...] rt.cpan.org |
From: | Kevin Ryde <user42_kevin [...] yahoo.com.au> |
In GraphViz2 2.45 and recent debian perl 24.1, the docs of
GraphViz2::Parse::ISA say the graph parameter is optional.
But omitting it gets an error. For example
use strict;
use GraphViz2::Parse::ISA;
my $parse = GraphViz2::Parse::ISA->new;
$parse->add(class => 'GraphViz2::Parse::ISA');
$parse->generate_graph;
=> Can't call method "dependency" on unblessed reference at /usr/share/perl5/GraphViz2/Parse/ISA.pm line 110.
I wonder if the "has graph" default bit is meant to be 0 or similar
false, rather than {}, so the default constructor in BUILD takes effect.
(Or move that into the default subr anyway.)