in reply to Adding functionality to an Object
Yes. You can do that.
The best way is probably to subclass the object and add your new methods to the subclass. But it's perfectly possible to add methods to an existing object. A method is just a subroutine that exists in a particular symbol table. You just have to switch to the correct package and define a new subroutine.
"The first rule of Perl club is you do not talk about
-- Chip Salzenberg
|Replies are listed 'Best First'.|
Re^2: Adding functionality to an Object
by jeanluca (Deacon) on Jul 13, 2006 at 09:02 UTC