| 1 | package Mail::DKIM::Canonicalization::dk_nofws; | ||
| 2 | 11 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 11 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 11 | our $VERSION = '1.20261116'; # VERSION | |
| 5 | # ABSTRACT: nofws canonicalization | ||
| 6 | |||
| 7 | # Copyright 2005-2006 Messiah College. All rights reserved. | ||
| 8 | # Jason Long <jlong@messiah.edu> | ||
| 9 | |||
| 10 | # This program is free software; you can redistribute it and/or | ||
| 11 | # modify it under the same terms as Perl itself. | ||
| 12 | |||
| 13 | 11 | ▶ | use base 'Mail::DKIM::Canonicalization::dk_simple'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 11 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 94 | ▶ | sub canonicalize_header { |
|
Subroutine
canonicalize_header: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 17 | 94 | my $self = shift; | |
| 18 | 94 | my ($line) = @_; | |
| 19 | |||
| 20 | 94 | $line =~ s/[ \t\015\012]//g; | |
| 21 | 94 | return $self->SUPER::canonicalize_header( $line . "\015\012" ); | |
| 22 | } | ||
| 23 | |||
| 24 | 30 | ▶ | sub canonicalize_body { |
|
Subroutine
canonicalize_body: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 25 | 30 | my $self = shift; | |
| 26 | 30 | my ($multiline) = @_; | |
| 27 | |||
| 28 | 30 | $multiline =~ s/[ \t]//g; | |
| 29 | 30 | $multiline =~ s/\015(?!\012)//g; # standalone CR | |
| 30 | 30 | $multiline =~ s/([^\015])\012/$1/g; # standalone LF | |
| 31 | 30 | return $self->SUPER::canonicalize_body($multiline); | |
| 32 | } | ||
| 33 | |||
| 34 | 11 | 1; | |
| 35 | |||
| 36 | __END__ | ||