Mail::Milter::ContextWrapper(3pm) | User Contributed Perl Documentation | Mail::Milter::ContextWrapper(3pm) |
Mail::Milter::ContextWrapper - Perl extension for wrappering the milter context
use Mail::Milter::ContextWrapper; my $oldctx = ($ctx from callback); # in the connect_callback $oldctx->setpriv(new Mail::Milter::ContextWrapper($ctx, { methodname => \&methodimpl[, ...] })); # in all callbacks my $newctx = $ctx->getpriv(); # in the close_callback $oldctx->setpriv(undef);
Mail::Milter::ContextWrapper wraps the milter context with replacement methods defined by the caller. This can be used to intercept context object actions and manipulate them from within a Mail::Milter::Wrapper.
Because the wrappering must occur on every callback, this implementation suggests embedding the wrapper inside the private data of the milter itself. This works with existing milters by providing separate "setpriv" and "getpriv" methods within the wrapper that do not propagate up to the embedded context object.
NAMEs are names of methods to override within the wrapper. These methods will be called with the wrapper as first argument (like a normal object method).
This method cannot be overridden by the user.
This method cannot be overridden by the user.
This method cannot be overridden by the user.
Todd Vierling, <tv@duh.org> <tv@pobox.com>
Mail::Milter, Sendmail::Milter
2023-01-22 | perl v5.36.0 |