Skip Menu |

This queue is for tickets about the GraphViz2 CPAN distribution.

Report information
The Basics
Id: 121599
Status: resolved
Priority: 0/
Queue: GraphViz2

People
Owner: Nobody in particular
Requestors: user42_kevin [...] yahoo.com.au
Cc:
AdminCc:

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



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.)
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Wed, 10 May 2017 19:20:57 +1000
To: bug-GraphViz2 [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Kevin Thanx for the report. It's 19:20 here now, so tomorrow! On 10/05/17 19:18, Kevin Ryde via RT wrote: Show quoted text
> Wed May 10 05:18:18 2017: Request 121599 was acted upon. > Transaction: Ticket created by user42_kevin@yahoo.com.au > Queue: GraphViz2 > Subject: GraphViz2::Parse::ISA when no graph given > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: user42_kevin@yahoo.com.au > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121599 > > > > 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.) >
-- Ron Savage - savage.net.au
V 2.46 is now on CPAN. Please see the Changes file for details. Thanx Kevin.
V 2.46 is now on CPAN. Please see the Changes file for details. Thanx Kevin.
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Sat, 13 May 2017 12:50:47 +1000
To: "RSAVAGE via RT" <bug-GraphViz2 [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
"RSAVAGE via RT" <bug-GraphViz2@rt.cpan.org> writes: Show quoted text
> > V 2.46 is now on CPAN.
Oh, alas I think one more the same in GraphViz2::DBI. (But that should be the last.) use strict; use DBI; use GraphViz2::DBI; my $dbh = DBI->connect("dbi:SQLite:dbname=$ENV{HOME}/.cpan/cpandb.sql", '','',{ReadOnly=>1}); my $dd = GraphViz2::DBI->new (dbh => $dbh); my $graph = $dd->create; $graph->run(format=>'x11'); => Can't call method "add_node" on unblessed reference at /usr/share/perl5/GraphViz2/DBI.pm line 156.
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Sun, 14 May 2017 11:27:04 +1000
To: bug-GraphViz2 [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Kevin This is different. GraphViz2::DBI has neither a generate_graph() method nor a run() method. It only has a create() method, and it has no parent, so your sample code can't ever run. On 13/05/17 12:52, Kevin Ryde via RT wrote: Show quoted text
> Queue: GraphViz2 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121599 > > > "RSAVAGE via RT" <bug-GraphViz2@rt.cpan.org> writes:
>> >> V 2.46 is now on CPAN.
> > Oh, alas I think one more the same in GraphViz2::DBI. > (But that should be the last.) > > use strict; > use DBI; > use GraphViz2::DBI; > my $dbh = DBI->connect("dbi:SQLite:dbname=$ENV{HOME}/.cpan/cpandb.sql", > '','',{ReadOnly=>1}); > my $dd = GraphViz2::DBI->new (dbh => $dbh); > my $graph = $dd->create; > $graph->run(format=>'x11'); > > => Can't call method "add_node" on unblessed reference at /usr/share/perl5/GraphViz2/DBI.pm line 156. >
-- Ron Savage - savage.net.au
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Mon, 15 May 2017 18:19:26 +1000
To: "ron\ [...] savage.net.au via RT" <bug-GraphViz2 [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
"ron@savage.net.au via RT" <bug-GraphViz2@rt.cpan.org> writes: Show quoted text
> > ... so your sample code can't ever run.
Oops, too much cut and paste. But I think GraphViz2::DBI errored out before it got to my mistake. Ok, so this one works use strict; use DBI; use GraphViz2::DBI; my $dbh = DBI->connect("dbi:SQLite:dbname=$ENV{HOME}/.cpan/cpandb.sql", '','',{ReadOnly=>1}); my $dd = GraphViz2::DBI->new (dbh => $dbh, graph=>GraphViz2->new); $dd->create; $dd->graph->run(format=>'x11'); but without the graph=> bit does not, use strict; use DBI; use GraphViz2::DBI; my $dbh = DBI->connect("dbi:SQLite:dbname=$ENV{HOME}/.cpan/cpandb.sql", '','',{ReadOnly=>1}); my $dd = GraphViz2::DBI->new (dbh => $dbh); $dd->create; $dd->graph->run(format=>'x11');
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Tue, 16 May 2017 09:03:03 +1000
To: bug-GraphViz2 [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Kevin Ahh, yes, cut-and-paste. No matter. You've got something which work (as intended :-)! On 15/05/17 18:21, Kevin Ryde via RT wrote: Show quoted text
> Queue: GraphViz2 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121599 > > > "ron@savage.net.au via RT" <bug-GraphViz2@rt.cpan.org> writes:
>> >> ... so your sample code can't ever run.
> > Oops, too much cut and paste. But I think GraphViz2::DBI errored out > before it got to my mistake. Ok, so this one works > > use strict; > use DBI; > use GraphViz2::DBI; > my $dbh = DBI->connect("dbi:SQLite:dbname=$ENV{HOME}/.cpan/cpandb.sql", > '','',{ReadOnly=>1}); > my $dd = GraphViz2::DBI->new (dbh => $dbh, graph=>GraphViz2->new); > $dd->create; > $dd->graph->run(format=>'x11'); > > but without the graph=> bit does not, > > use strict; > use DBI; > use GraphViz2::DBI; > my $dbh = DBI->connect("dbi:SQLite:dbname=$ENV{HOME}/.cpan/cpandb.sql", > '','',{ReadOnly=>1}); > my $dd = GraphViz2::DBI->new (dbh => $dbh); > $dd->create; > $dd->graph->run(format=>'x11'); >
-- Ron Savage - savage.net.au
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Thu, 18 May 2017 16:26:09 +1000
To: "ron\ [...] savage.net.au via RT" <bug-GraphViz2 [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
"ron@savage.net.au via RT" <bug-GraphViz2@rt.cpan.org> writes: Show quoted text
> > No matter. You've got something which work (as intended :-)!
My point was that the docs of GraphViz2::DBI ->new say "graph ... this key is optional". So the one which doesn't work - I expected would work.
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Thu, 18 May 2017 16:36:43 +1000
To: bug-GraphViz2 [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Kevin Ahh, yes. Sorry - you did say that originally. I need to fix the docs. On 18/05/17 16:29, Kevin Ryde via RT wrote: Show quoted text
> Queue: GraphViz2 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121599 > > > "ron@savage.net.au via RT" <bug-GraphViz2@rt.cpan.org> writes:
>> >> No matter. You've got something which work (as intended :-)!
> > My point was that the docs of GraphViz2::DBI ->new say "graph ... this > key is optional". So the one which doesn't work - I expected would > work. >
-- Ron Savage - savage.net.au
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Sat, 20 May 2017 19:15:08 +1000
To: "ron\ [...] savage.net.au via RT" <bug-GraphViz2 [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
"ron@savage.net.au via RT" <bug-GraphViz2@rt.cpan.org> writes: Show quoted text
> > I need to fix the docs.
It works for me to do the code the same as you did the others, false instead of {} ... (which is why I said one more place ... :) has graph => ( default => sub {return ''},
Subject: Re: [rt.cpan.org #121599] GraphViz2::Parse::ISA when no graph given
Date: Sun, 21 May 2017 10:10:21 +1000
To: bug-GraphViz2 [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Kevin On 20/05/17 19:18, Kevin Ryde via RT wrote: Show quoted text
> Queue: GraphViz2 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=121599 > > > "ron@savage.net.au via RT" <bug-GraphViz2@rt.cpan.org> writes:
>> >> I need to fix the docs.
> > It works for me to do the code the same as you did the others, false > instead of {} ... (which is why I said one more place ... :) > > has graph => ( default => sub {return ''},
I can see how that works, so yes, it's a viable alternative. -- Ron Savage - savage.net.au