Matt Sergeant wrote:
Well I'm not so sure... On second thoughts, adding in capabilities isn't exactly an everyday thing. What would be nicer though is if the notes field always contained a minimum empty arrayref. Then we can just push more capabilities onto the list.

Can't you do something suitably evil with AUTOLOAD that would create a setter/getter on the fly for unnamed attribute (which would be stored in the notes() field by design). Before storing a value, you could make sure that notes() contained an arrayref already (and on access it would always return at least an empty arrayref).

For that matter, we could add that to a higher level object (Qpsmtpd?) and inherit it, then use it to always store stuff in the $self->notes() field.

Or is that just too magical?

John

Reply via email to