in reply to Re: OO: extending a closure object
in thread OO: extending a closure object

I see one problem here;

return $extended->$field( @_ );

requires that my setters in the base class are called exactly as the field names. Otherwise it won't work :(

p.e. in my base class I have a field ACCOUNT and a setter called setAccount. The constructor above will however call my base class as $extended->ACCOUNT instead of $extended->setAccount.

--
if ( 1 ) { $postman->ring() for (1..2); }

Replies are listed 'Best First'.
Re^3: OO: extending a closure object
by Roy Johnson (Monsignor) on Feb 23, 2006 at 21:31 UTC
    I think that was supposed to be
    return $extended->($field, @_);

    Caution: Contents may have been coded under pressure.