PDF/Bool.pm

filter: Statementstmt 84.6% 11 / 13 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 72.7% 16 / 22 CC 2 SCAR 10.4
CC
2
Cov
73%
as_pdf
6.0
convert
2.0
BEGIN
1.0
CRAP 2.8
« PDF/Page.pm ↑ Summary PDF/Null.pm »
1 package Text::PDF::Bool;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw(@ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 # no warnings qw(uninitialized);
6  
7 1 ▶use Text::PDF::String;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 @ISA = qw(Text::PDF::String);
9  
10 =head1 NAME
11  
12 PDF::Bool - A special form of L<PDF::String> which holds the strings
13 B<true> or B<false>
14  
15 =head1 METHODS
16  
17 =head2 $b->convert($str)
18  
19 Converts a string into the string which will be stored.
20  
21 =cut
22  
23 sub convert
24 0 ▶{ return $_[1] eq "true"; }
Subroutine convert: not called CC=1 SCAR=6.9
Pod documented
25  
26  
27 =head2 as_pdf
28  
29 Converts the value to a PDF output form
30  
31 =cut
32  
33 sub as_pdf
34 0 ▶{ $_[0]->{'val'} ? "true" : "false"; }
Subroutine as_pdf: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{'val'} ? : 0 0 0
35  
36 1 1;
37  
« PDF/Page.pm ↑ Summary PDF/Null.pm »