404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.188.107.17: ~ $
# Copyrights 1995-2016 by [Mark Overmeer <perl@overmeer.net>].
#  For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.02.
use strict;
package Mail::Filter;
use vars '$VERSION';
$VERSION = '2.18';


use Carp;

sub new(@)
{   my $class = shift;
    bless { filters => [ @_ ] }, $class;
}


sub add(@)
{   my $self = shift;
    push @{$self->{filters}}, @_;
}


sub _filter($)
{   my ($self, $mail) = @_;

    foreach my $sub ( @{$self->{filters}} )
    {   my $mail
          = ref $sub eq 'CODE' ? $sub->($self,$mail)
	  : !ref $sub          ? $self->$sub($mail)
	  : carp "Cannot call filter '$sub', ignored";

	ref $mail or last;
    }

    $mail;
}

sub filter
{   my ($self, $obj) = @_;
    if($obj->isa('Mail::Folder'))
    {   $self->{folder} = $obj;
	foreach my $m ($obj->message_list)
	{   my $mail = $obj->get_message($m) or next;
	    $self->{msgnum} = $m;
	    $self->_filter($mail);
	}
	delete $self->{folder};
	delete $self->{msgnum};
    }
    elsif($obj->isa('Mail::Internet'))
    {   return $self->filter($obj);
    }
    else
    {   carp "Cannot process '$obj'";
	return undef;
    }
}


sub folder() {shift->{folder}}


sub msgnum() {shift->{msgnum}}

1;

Filemanager

Name Type Size Permission Actions
Field Folder 0755
Mailer Folder 0755
Address.pm File 6.66 KB 0644
Address.pod File 3.71 KB 0644
Cap.pm File 6.17 KB 0644
Cap.pod File 3.74 KB 0644
Field.pm File 4.68 KB 0644
Field.pod File 4.9 KB 0644
Filter.pm File 1.23 KB 0644
Filter.pod File 2.79 KB 0644
Header.pm File 14.02 KB 0644
Header.pod File 7.72 KB 0644
Internet.pm File 12 KB 0644
Internet.pod File 10.31 KB 0644
Mailer.pm File 4.73 KB 0644
Mailer.pod File 3.88 KB 0644
Send.pm File 1.13 KB 0644
Send.pod File 2.8 KB 0644
Sendmail.pm File 32.64 KB 0644
Util.pm File 3.14 KB 0644
Util.pod File 3.08 KB 0644