On 2010-10-23 18:50, David Favor wrote:

Given an instantiated class object, what's the
best way to add additional methods after instantiation.

Specifically I'm working with qpsmtpd and desire to
add a method is_spooled() to every session, so I can
call if ($self->is_spooled) rather then is_spooled($self)...

Why add them after instantiation?

Much neater to subclass, and then add the method to the new class.

Or maybe you want a queue plugin?
http://ankh-morp.org/docs/qpsmtpd/writing.html

--
Ruud

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to