blib/lib/Siesta/Plugin/Archive.pm

filter: Statementstmt 100% 25 / 25 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 66.6% 2 / 3 totaltotal 94.7% 36 / 38 CC 2 SCAR 2.0
CC
2
Cov
96%
process
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Siesta/Plugin/ReplyTo.pm ↑ Summary blib/lib/Siesta/Plugin/MessageFooter.pm »
1 # $Id: Archive.pm 1306 2003-08-11 09:24:32Z richardc $
2 package Siesta::Plugin::Archive;
3 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use Siesta::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use Siesta::Plugin;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 ▶use base 'Siesta::Plugin';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 8 ▶use Email::LocalDelivery;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶sub description {
Subroutine description: called CC=1 SCAR=0.0
Pod undocumented
10 1 "save a copy of the message to an archive."
11 }
12  
13 1 ▶sub process {
Subroutine process: called CC=2 SCAR=7.0
Pod documented
14 1 my $self = shift;
15 1 my $mail = shift;
16  
17 1 my $path = $self->pref('path');
18 1 ▶ Email::LocalDelivery->deliver( $mail->as_string, $path )
Branch: 1 branch
BranchTrueFalseTotal
"Email::LocalDelivery"->deliver($mail->as_string, $path) or die "local delivery into '${path}' failed" 1 0 1
19 or die "local delivery into '$path' failed";
20 1 return;
21 }
22  
23 1 ▶sub options {
Subroutine options: called CC=1 SCAR=0.0
Pod documented
24 1 my $self = shift;
25 1 my $name = $self->list->name;
26  
27 +{
28 1 path => {
29 description => "where to drop the archives",
30 type => "string",
31 default => "$Siesta::Config::ARCHIVE/$name/",
32 },
33 };
34 }
35  
36 8 1;
« blib/lib/Siesta/Plugin/ReplyTo.pm ↑ Summary blib/lib/Siesta/Plugin/MessageFooter.pm »