in reply to Re^5: perl inheritance
in thread perl inheritance

in other words, I'm getting the following error when I try to call $class->new(...)
Can't locate object method "new" via package "HASH" (perhaps you forgo +t to load "HASH"?) at Table.pm line 34. at Table.pm line 34
I thought that reftype would return the polymorphic type (i.e. the subclass). Sorry Chromatic, but I'm bit confused here..

Replies are listed 'Best First'.
Re^7: perl inheritance
by tangent (Parson) on Mar 29, 2012 at 16:11 UTC
    Yes, reftype() returns the type of the variable. I think what was meant was blessed() which returns the name of the package that it is blessed into:
    my $class = blessed $self;