blib/lib/Siesta/Plugin/SubjectTag.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 4 / 4 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 6 / 6 Podpod 66.6% 2 / 3 totaltotal 97.2% 35 / 36 CC 4 SCAR 8.5
CC
4
Cov
100%
process
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« blib/lib/Siesta/Web/FakeApache.pm ↑ Summary blib/lib/Siesta/Plugin/Debounce.pm »
1 package Siesta::Plugin::SubjectTag;
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use Siesta::Plugin;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use base 'Siesta::Plugin';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6  
7 1 ▶sub description {
Subroutine description: called CC=1 SCAR=0.0
Pod undocumented
8 1 'allows you to add something to the start of the subject line of each outgoing mail';
9 }
10  
11 9 ▶sub process {
Subroutine process: called CC=4 SCAR=13.9
Pod documented
12 9 my $self = shift;
13 9 my $mail = shift;
14  
15 9 my $munge = $self->pref('subjecttag');
16  
17 9 ▶ return unless $munge;
Branch: 1 branch
BranchTrueFalseTotal
unless $munge 1 8 9
18  
19 8 ▶ my $subject = $mail->subject || 'no subject';
Condition100%2/2
$mail->subject || 'no subject'
l!l
62
MC/DC100%1/1
$mail->subject || 'no subject'
$mail->subject
Truth table100%2/2
A
A= $mail->subject
Aresult
11
00
20 8 my $list_name = $self->list->name;
21 8 ▶ $mail->subject("$munge $subject")
Branch: 1 branch
BranchTrueFalseTotal
unless $subject =~ /\Q$munge\E/ 4 4 8
22 unless $subject =~ /\Q$munge/;
23 8 return;
24 }
25  
26 11 ▶sub options {
Subroutine options: called CC=1 SCAR=0.0
Pod documented
27 +{
28 11 'subjecttag'
29 => {
30 'description' =>
31 'Add something to the start of the subject line of each out going mail.',
32 'type' => 'string',
33 'default' => '',
34 'widget' => 'textbox',
35 },
36 };
37 }
38  
39  
40 4 1;
41 __END__
« blib/lib/Siesta/Web/FakeApache.pm ↑ Summary blib/lib/Siesta/Plugin/Debounce.pm »