blib/lib/Egg/View/Mail/Plugin/Jfold.pm

filter: Statementstmt 57.8% 11 / 19 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 75.0% 3 / 4 Podpod n/a totaltotal 50.0% 14 / 28 CC 4 SCAR 24.7
CC
4
Cov
48%
__get_mailbody
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 11.9
« blib/lib/Egg/View/Mail/Plugin/PortCheck.pm ↑ Summary blib/lib/Egg/View/Mail/Plugin/SaveBody.pm »
1 package Egg::View::Mail::Plugin::Jfold;
2 #
3 # Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
4 #
5 # $Id: Jfold.pm 285 2008-02-28 04:20:55Z lushe $
6 #
7 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Jcode;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 our $VERSION = '0.01';
12  
13 0 ▶sub __get_mailbody {
Subroutine __get_mailbody: not called CC=4 SCAR=30.0
14 0 my($self, $data)= @_;
15 0 my $body= $self->next::method($data);
16 0 my $j = $self->{jcode_context}= Jcode->new('jcode');
17 0 ▶ my $len = $data->{line_length} || 72;
Condition0%0/2
$data->{'line_length'} || 72
l!l
00
MC/DC0%0/1
$data->{'line_length'} || 72
$data->{'line_length'}
Truth table0%0/2
A
A= $data->{'line_length'}
Aresult
11
00
18 0 my $text;
19 0 for (split /\n/, $$body) {
20 0 ▶ $text.= $_ ? join("\n", $j->set(\$_)->jfold($len)). "\n" : "\n";
Branch: 1 branch
BranchTrueFalseTotal
$_ ? : 0 0 0
21 }
22 0 \$text;
23 }
24  
25 2 1;
26  
27 __END__
« blib/lib/Egg/View/Mail/Plugin/PortCheck.pm ↑ Summary blib/lib/Egg/View/Mail/Plugin/SaveBody.pm »