Hi. I'm trying to make a class that overrides Mail::Audit's accept() method. I want to do a few simple things then call SUPER::accept(). It all seems fairly straightforward, but my overridden accept() doesn't seem to be running at all. I'm relatively inexperienced with Perl's OO inheritance, so maybe there's something I'm missing?
Here's my new class:
package Mail::Audit::Summarize; use strict; use warnings; use Mail::Audit; our @ISA = qw(Mail::Audit); 1; sub accept { # I put this in to see if my accept() is even being # called. It appears not (since this die() call is # apparently not running). die "MY ACCEPT IS RUNNING.\n"; my $self = shift; # nothing here yet. $self->SUPER::accept(@_); }
And here's how I call it:
#!/usr/bin/perl use strict; use warnings; use lib '/home/diablo/modules'; use Mail::Audit::Summarize; my $item = Mail::Audit::Summarize->new(); $item->accept();
When I run email through this filter, the mail gets properly deposited into my mail spool, but doesn't seem to use my accept() at all. Any pointers or problems found would be much appreciated.
In reply to Overriding Mail::Audit's accept() by revdiablo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |