Peter J. Holzer wrote:
> Actually, since Qpsmtpd::Address is a hashref, any plugin could just store
> and retrieve arbitrary information in it. But that's ugly and violates
> OO principles, so I wouldn't propose that as a general solution.

If that's the part that makes you queasy, there's two ways around that:

1) subclass Qpsmtpd::Address and add your own object methods (you need to hook
rcpt anyways, so just rebless the object into your own class at the top);

2) somewhat more evil, extend the Qpsmtpd::Address class by adding a new object
method (using eval in creative ways); we could even make that easier adding a
method-maker method to Qpsmtpd::Address (or Qpsmtpd.pm for that matter).

You aren't going to hear any complaints from me if your plugins diddle the
"private object data" anyways, because that data is yours to play with and
extend.  I've got a copy of TheDamien's book, so we could lock up the objects if
we wanted to... ;-)

John

Reply via email to