Sietima/Role/ManualSubscription.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 92.3% 24 / 26 CC 2 SCAR 3.0
CC
2
Cov
95%
__ANON__
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Sietima/Role/NoMail.pm ↑ Summary Sietima/Role/NoSpoof.pm »
1 package Sietima::Role::ManualSubscription;
2 1 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Sietima::Policy;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Sietima::HeaderURI;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '1.1.5'; # VERSION
8 # ABSTRACT: adds standard list-related headers to messages
9  
10 1 with 'Sietima::Role::WithOwner';
11  
12  
13 1 ▶around list_addresses => sub($orig,$self) {
Subroutine __ANON__: called CC=2 SCAR=7.2
14 1 ▶ my $list_name = $self->name // 'the list';
Condition50%1/2
$self->name // "the list"
l!l
10
MC/DC0%0/1
$self->name // "the list"
$self->name
Truth table50%1/2
A
A= $self->name
Aresult
11
00
15  
16 return +{
17 1 $self->$orig->%*,
18 subscribe => Sietima::HeaderURI->new_from_address(
19 $self->owner,
20 { subject => "Please add me to $list_name" },
21 ),
22 unsubscribe => Sietima::HeaderURI->new_from_address(
23 $self->owner,
24 { subject => "Please remove me from $list_name" },
25 ),
26 };
27 1 };
28  
29  
30 1 1;
31  
32 __END__
« Sietima/Role/NoMail.pm ↑ Summary Sietima/Role/NoSpoof.pm »