Don't ask to ask, just ask | |
PerlMonks |
Re: Regarding Perl Class Objectby Sidhekin (Priest) |
on Feb 22, 2007 at 06:46 UTC ( [id://601494]=note: print w/replies, xml ) | Need Help?? |
Your new method is returning $self->{FORM_VAR}, which is undefined. You want to return $self, your newly created and blessed object. And you want to lose those prototypes. Oh, and you want to use strict. ... which will lead you to an error in your name method, where $self is undeclared and undefined. You'll want my $self = shift; ... and then you might want to look into using packages other than main. :)
print "Just another Perl ${\(trickster and hacker)},"
In Section
Seekers of Perl Wisdom
|
|