Mail::ListDetector::Detector::Base - base class for mailing list detectors


Mail-ListDetector documentation Contained in the Mail-ListDetector distribution.

Index


Code Index:

NAME

Top

Mail::ListDetector::Detector::Base - base class for mailing list detectors

SYNOPSIS

Top

  use Mail::ListDetector::Detector::Base;

DESCRIPTION

Top

Abstract base class for mailing list detectors, should not be instantiated directly.

METHODS

Top

new()

Provides a simple constructor for the class. Accepts an optional data argument and stores that argument in the object if it is supplied.

match()

This just dies, and should be implemented in any subclass.

BUGS

Top

No known bugs.

AUTHOR

Top

Michael Stevens - michael@etla.org.


Mail-ListDetector documentation Contained in the Mail-ListDetector distribution.

package Mail::ListDetector::Detector::Base;

use strict;
use warnings;

sub new {
  my $proto = shift;
  my $data = shift;
  my $class = ref($proto) || $proto;
  my $self = {};
  $self->{'data'} = $data;

  bless ($self, $class);
  return $self;
}

sub match {
  die "This method must be implemented by a subclass\n";
}

1;

__END__