in reply to perl oo
From my poor knowledge on OO Perl, the first parameter of your call to 'new' is the name of the package or class.
If you write it this way:
sub new { my $class = @_; my $self = ( user => $_[1], session => 4556, ); bless($self, $class); return $self; }
and it should do what you're looking for.
<kbd>--
|
---|
Replies are listed 'Best First'. | |
---|---|
(Ovid - quick fix to your new constructor) Re(2): perl oo
by Ovid (Cardinal) on Jan 15, 2001 at 23:48 UTC |