blib/lib/Egg/View/Mail/Encode/ISO2022JP.pm

filter: Statementstmt 57.8% 11 / 19 Branchbran n/a Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 75.0% 3 / 4 Podpod n/a totaltotal 45.1% 14 / 31 CC 3 SCAR 18.7
CC
3
Cov
46%
__get_mailbody
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
« lib/Egg/Helper/View/Mail.pm ↑ Summary blib/lib/Egg/Release/Mail.pm »
1 package Egg::View::Mail::Encode::ISO2022JP;
2 #
3 # Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
4 #
5 # $Id: ISO2022JP.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=3 SCAR=24.8
14 0 my($self, $data)= @_;
15 0 my $body= $self->next::method($data);
16 0 ▶ my $j= $self->{jcode_context} ||= Jcode->new('jcode');
Condition0%0/3
$self->{"jcode_context"} ||= "Jcode"->new("jcode")
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{"jcode_context"} ||= "Jcode"->new("jcode")
$self->{"jcode_context"} "Jcode"->new("jcode")
Truth table0%0/3
A ||= B
A= $self->{"jcode_context"}B= "Jcode"->new("jcode")
ABresult
1X1
011
000
17 0 $data->{subject}= $j->set(\$data->{subject})->mime_encode;
18 0 ▶ my $headers= $data->{headers} ||= {};
Condition0%0/2
$data->{"headers"} ||= {}
l!l
00
MC/DC0%0/1
$data->{"headers"} ||= {}
$data->{"headers"}
Truth table0%0/2
A
A= $data->{"headers"}
Aresult
11
00
19 0 $headers->{Encoding}= '7bit';
20 0 $headers->{Charset} = 'ISO-2022-JP';
21 0 \$j->set($body)->iso_2022_jp;
22 }
23  
24 2 1;
25  
26 __END__
« lib/Egg/Helper/View/Mail.pm ↑ Summary blib/lib/Egg/Release/Mail.pm »