| 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"
MC/DC0%0/1
$self->name // "the list"
$self->name
Truth table50%1/2
A
A= $self->name
| |||||||||||||
| 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__ | ||||||||||||