SRS/Reversible.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« SRS/Reversable.pm ↑ Summary
1 package Mail::SRS::Reversible;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use vars qw(@ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 ▶use Mail::SRS qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 4 ▶use Mail::SRS::Shortcut;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 4 @ISA = qw(Mail::SRS::Shortcut);
11  
12 =head1 NAME
13  
14 Mail::SRS::Reversible - A fully reversible Sender Rewriting Scheme
15  
16 =head1 SYNOPSIS
17  
18 use Mail::SRS::Reversible;
19 my $srs = new Mail::SRS::Reversible(...);
20  
21 =head1 DESCRIPTION
22  
23 See Mail::SRS for details of the standard SRS subclass interface.
24 This module provides the methods compile() and parse(). It operates
25 without store.
26  
27 =head1 SEE ALSO
28  
29 L<Mail::SRS>
30  
31 =cut
32  
33 27 ▶sub compile {
Subroutine compile: called CC=1 SCAR=0.0
Pod documented
34 27 my ($self, $sendhost, $senduser) = @_;
35  
36 27 my $timestamp = $self->timestamp_create();
37  
38 # This has to be done in compile, because we might need access
39 # to it for storing in a database.
40 27 my $hash = $self->hash_create($timestamp, $sendhost, $senduser);
41  
42 # Note that there are 4 fields here and that sendhost may
43 # not contain a + sign. Therefore, we do not need to escape
44 # + signs anywhere in order to reverse this transformation.
45 27 return $SRS0TAG . $self->separator .
46 join($SRSSEP, $hash, $timestamp, $sendhost, $senduser);
47 }
48  
49 4 1;
« SRS/Reversable.pm ↑ Summary