[Mailmunge] 3.08 change to $ctx->METHOD(@args);

Dianne Skoll dianne at skollsoft.com
Mon Oct 24 14:41:38 EDT 2022


On Mon, 24 Oct 2022 14:38:39 -0400
list--- via Mailmunge <mailmunge at lists.mailmunge.org> wrote:

> The functions such as filter_recipient() and filter_message() capture
> $self. my ($self, $ctx) = @_;

Right.

> $self was only used in $self->METHOD($ctx, @args) which is now
> $ctx->METHOD(@args); After making these edits $self is no longer
> needed and only exist in the function capture.

Well, that's the case for your specific filter_recipient and filter_message
functions.  There may be other people who do still need $self (eg,
to call things like $self->canonical_email() and others...)

So:  The arguments passed to the callback functions filter_XXX will
ALWAYS be ($self, $ctx).

Regards,

Dianne.


More information about the Mailmunge mailing list