Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re: Is it legal to create subs in a module?by Fletch (Bishop) |
on Oct 11, 2001 at 20:27 UTC ( [id://118261]=note: print w/replies, xml ) | Need Help?? |
Of course you could be evil and use a blessed coderef as your representation. That coderef could dispatch methods differently for each instance (the instance information being kept in a lexical visible when the closure is created). But you probably can only get away with that if you're Damian (c.f. Object Oriented Perl, Chapter 11, p297-300).
In Section
Seekers of Perl Wisdom
|
|