| 1 | # Mail::MboxParser - object-oriented access to UNIX-mailboxes | ||||||||||
| 2 | # base-class for all other classes in Mail::MboxParser | ||||||||||
| 3 | # | ||||||||||
| 4 | # Copyright (C) 2001 Tassilo v. Parseval | ||||||||||
| 5 | # This program is free software; you can redistribute it and/or | ||||||||||
| 6 | # modify it under the same terms as Perl itself. | ||||||||||
| 7 | |||||||||||
| 8 | # Version: $Id: Base.pm,v 1.6 2002/02/21 09:06:14 parkerpine Exp $ | ||||||||||
| 9 | |||||||||||
| 10 | package Mail::MboxParser::Base; | ||||||||||
| 11 | |||||||||||
| 12 | 20 | require 5.004; | |||||||||
| 13 | |||||||||||
| 14 | 20 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 20 | ▶ | use vars qw($VERSION); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 20 | $VERSION = "0.07"; | |||||||||
| 17 | |||||||||||
| 18 | 190 | ▶ | sub new(@) { | ||||||||
|
Subroutine
new: called CC=2 SCAR=7.3
Pod
undocumented
| |||||||||||
| 19 | 190 | my ($class, @args) = @_; | |||||||||
| 20 | |||||||||||
| 21 | 190 | ▶ | if ($class eq __PACKAGE__) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 20 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 0 | my $package = __PACKAGE__; | |||||||||
| 24 | 0 | croak <<USAGE; | |||||||||
| 25 | $package should not really be instantiated directly. | ||||||||||
| 26 | Instead, create one of its derived subclasses such as Mail::MboxParser. | ||||||||||
| 27 | USAGE | ||||||||||
| 28 | } | ||||||||||
| 29 | 190 | my $self = bless {}, $class; | |||||||||
| 30 | 190 | $self->init(@args); | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 50 | ▶ | sub error() { shift->{LAST_ERR} } | ||||||||
|
Subroutine
error: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | sub log() { shift->{LAST_LOG} } | ||||||||
|
Subroutine
log: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 36 | |||||||||||
| 37 | 1475 | ▶ | sub reset_last { | ||||||||
|
Subroutine
reset_last: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 38 | 1475 | my $self = shift; | |||||||||
| 39 | 1475 | ($self->{LAST_ERR}, $self->{LAST_LOG}) = (undef, undef); | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 20 | 1; | |||||||||
| 43 | |||||||||||
| 44 | __END__ | ||||||||||