in reply to Re: Is it legal to create subs in a module?
in thread Is it legal to create subs in a module?
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).
|
|---|