| 1 | package MIME::Expander::Plugin; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 9 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 9 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 9 | ▶ | use vars qw($VERSION); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 9 | $VERSION = '0.02'; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 9 | ▶ | use parent qw(Class::Data::Inheritable); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 9 | ▶ | use Email::MIME; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 9 | __PACKAGE__->mk_classdata('ACCEPT_TYPES' => [qw( | |||||||||||||||||||
| 12 | )]); | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 31 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=8.1
Pod
undocumented
| |||||||||||||||||||||
| 15 | 31 | my $class = shift; | |||||||||||||||||||
| 16 | 31 | ▶ | bless {}, (ref $class || $class); | ||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 17 | } | ||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 259 | ▶ | sub is_acceptable { | ||||||||||||||||||
|
Subroutine
is_acceptable: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||
| 20 | 259 | my $self = shift; | |||||||||||||||||||
| 21 | 259 | ▶ | my $type = shift or return (); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 22 | 259 | for ( @{$self->ACCEPT_TYPES} ){ | |||||||||||||||||||
| 23 | 332 | ▶ | return 1 if( $type eq $_ ); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | 225 | return (); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 1 | ▶ | sub expand { | ||||||||||||||||||
|
Subroutine
expand: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 29 | 1 | my $self = shift; | |||||||||||||||||||
| 30 | 1 | my $part = shift; | |||||||||||||||||||
| 31 | 1 | my $callback = shift; | |||||||||||||||||||
| 32 | 1 | my $c = 0; | |||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 1 | ▶ | $callback->( $part->body ) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 35 | if( ref $callback eq 'CODE' ); | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 1 | ++$c; | |||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 1 | return $c; | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 9 | 1; | |||||||||||||||||||
| 43 | __END__ | ||||||||||||||||||||