diff --git a/Changes b/Changes index f4aadff..3bbf0b7 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + Add notes method to Qpsmtpd::Address objects (Jared Johnson) + Add remove_recipient method to the transaction object (Jared Johnson) 0.80 - February 27, 2009 diff --git a/lib/Qpsmtpd/Address.pm b/lib/Qpsmtpd/Address.pm index 71558bd..1db3e06 100644 --- a/lib/Qpsmtpd/Address.pm +++ b/lib/Qpsmtpd/Address.pm @@ -317,6 +317,21 @@ sub host { return $self->{_host}; } +=head2 notes($key[,$value]) + +Get or set a note on the address. This is a piece of data that you wish +to attach to the address and read somewhere else. For example you can +use this to pass data between plugins. + +=cut + +sub notes { + my ($self,$key) = (shift,shift); + # Check for any additional arguments passed by the caller -- including undef + return $self->{_notes}->{$key} unless @_; + return $self->{_notes}->{$key} = shift; +} + sub _addr_cmp { require UNIVERSAL; my ($left, $right, $swap) = @_;