File: Base.pm

package info (click to toggle)
libmail-listdetector-perl 1.04%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 200 kB
  • sloc: perl: 974; makefile: 2
file content (56 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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__

=head1 NAME

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

=head1 SYNOPSIS

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

=head1 DESCRIPTION

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

=head1 METHODS

=head2 new()

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

=head2 match()

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

=head1 BUGS

No known bugs.

=head1 AUTHOR

Michael Stevens - michael@etla.org.