> "Brad" == Brad Carlson <[EMAIL PROTECTED]> writes:
Brad> Just to clarify, the only reason I don't need a new() method in the
Brad> subclass is because any class-specific logic is contained in the _init()
Brad> method for both parent and subclass. If there were no _init() method,
Brad> then
TECTED]'; beginners@perl.org
Subject: RE: Attempting OO with Perl - New() method in subclass not
working
[EMAIL PROTECTED] wrote:
> I am trying to build an inheritable object, and I am using examples
> from the Perl Cookbook, 2nd edition, mostly Recipe 13.1, using the new
> and _init
ners@perl.org
Subject: Re: Attempting OO with Perl - New() method in subclass not
working
On Mar 31, [EMAIL PROTECTED] said:
> When I try to assign values to the DBLogon object's attributes, I get
> the following error: "Can't access 'USERID' field in object of cla
> "Jeff" == Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes:
Jeff> Oh, right. April Fool? ;)
Perhaps that's half right. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Com
On Apr 1, Randal L. Schwartz said:
"Jeff" == Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes:
Jeff>sub new {
Jeff> my $that = shift;
Jeff> my $class = ref($that) || $that;
Jeff> my $self = $class->SUPER::new();
Jeff> $self->SUPER::_init();
There's a rule of thumb from smallta
> "Jeff" == Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes:
Jeff>sub new {
Jeff> my $that = shift;
Jeff> my $class = ref($that) || $that;
Jeff> my $self = $class->SUPER::new();
Jeff> $self->SUPER::_init();
There's a rule of thumb from smalltalk that if you're using a "
On Mar 31, [EMAIL PROTECTED] said:
When I try to assign values to the DBLogon object's attributes, I get
the following error: "Can't access 'USERID' field in object of class
DBLogon at testdblogon.pl line 7". What am I missing?
The problem is that Logon's new() method is calling LogonDB's _init()
I am trying to build an inheritable object, and I am using examples from
the Perl Cookbook, 2nd edition, mostly Recipe 13.1, using the new and
_init methods.
I created a base class Logon and a subclass called DBLogon, in files
Logon.pm and DBLogon.pm, respectively. All referenced files are copi