Subject: | has_cycle with empty args should return FALSE |
Hi Jarkko
I'm not sure if this is really a bug or just a boundary case not
covered in the documentation. When calling has_cycle with no
arguments, the code returns a TRUE value. A literal reading of the
documentation suggests that the code should return FALSE.
A test program (which fails) follows.
Best,
Nat
--------------------
use Test::More qw/no_plan/;
use Graph::Directed;
my $g=new Graph::Directed(vertices=>['a']);
ok(!$g->has_cycle,'has_cycle with empty args should return FALSE');
--------------------