[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: On Pseudohashes



On Mon, Jan 17, 2000 at 06:30:46AM -0700, Tom Christiansen wrote:
> 
> I'm not sure, but I think I was just worried about figuring out
> whether a particular assignment was legal:
> 
>     my Dog $spot = frobnicate();
> 
> But that doesn't matter.  All you care about is whether the methods
> invoked against whatever happens at run time to have taken up
> residence in the $spot variable.  So long as that class's @ISA and
> package symbol table are populated at compile-time with the same
> data as they'll ever hold at run-time, you could do the check.
> Likewise recursively for parent classes.
> 
> The presence of an AUTOLOAD anywhere in the graph seems to make
> compile-time validation pointless.

It's always been advisable for classes to pre-declare all their methods
if using AUTOLOAD.

Tim.


Follow-Ups from:
Tom Christiansen <tchrist@chthon.perl.com>
References to:
Tom Christiansen <tchrist@chthon.perl.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]