Subject: | Problems with Inheritance of the base Graph class |
I'm am getting the following problems with the 0.5 version of Graph.
bash-2.05$ ./testing.pl
Not an ARRAY reference at /<snip>/lib/perl5/site_perl/5.8.0/Graph.pm line 481.
bash-2.05$ cat testing.pl
#!/usr/bin/perl
use strict;
use warnings;
use Graph::Test;
my $G = Graph::Test->new();
if($G->has_edge("foo", "bar")) {
print "hi";
}
bash-2.05$ cat Graph/Test.pm
package Graph::Test;
use base ("Graph");
use PDL;
sub new {
my $invocant = shift;
my $class = ref($invocant) || $invocant;
my $self = {
L => pdl [],
@_,
};
return bless $self, $class;
}
1;
This works fine in Graph-0.20105... This breaks a lot of my classes based on Graph...
This is perl, v5.8.0 built for i386-linux-thread-multi
Linux <snip> 2.4.20-31.9.progeny.5smp #1 SMP Tue Aug 10 01:31:24 EDT 2004 i686 i686 i386 GNU/Linux