| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#======================================================================= |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# THIS IS A REUSED PERL MODULE, FOR PROPER LICENCING TERMS SEE BELOW: |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# Copyright Martin Hosken |
|
6
|
|
|
|
|
|
|
# |
|
7
|
|
|
|
|
|
|
# No warranty or expression of effectiveness, least of all regarding |
|
8
|
|
|
|
|
|
|
# anyone's safety, is implied in this software or documentation. |
|
9
|
|
|
|
|
|
|
# |
|
10
|
|
|
|
|
|
|
# This specific module is licensed under the Perl Artistic License. |
|
11
|
|
|
|
|
|
|
# Effective 28 January 2021, the original author and copyright holder, |
|
12
|
|
|
|
|
|
|
# Martin Hosken, has given permission to use and redistribute this module |
|
13
|
|
|
|
|
|
|
# under the MIT license. |
|
14
|
|
|
|
|
|
|
# |
|
15
|
|
|
|
|
|
|
#======================================================================= |
|
16
|
|
|
|
|
|
|
package PDF::Builder::Basic::PDF::Bool; |
|
17
|
|
|
|
|
|
|
|
|
18
|
41
|
|
|
41
|
|
729
|
use base 'PDF::Builder::Basic::PDF::String'; |
|
|
41
|
|
|
|
|
79
|
|
|
|
41
|
|
|
|
|
16148
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
41
|
|
|
41
|
|
270
|
use strict; |
|
|
41
|
|
|
|
|
65
|
|
|
|
41
|
|
|
|
|
723
|
|
|
21
|
41
|
|
|
41
|
|
166
|
use warnings; |
|
|
41
|
|
|
|
|
70
|
|
|
|
41
|
|
|
|
|
3777
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our $VERSION = '3.024'; # VERSION |
|
24
|
|
|
|
|
|
|
our $LAST_UPDATE = '3.024'; # manually update whenever code is changed |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 NAME |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
PDF::Builder::Basic::PDF::Bool - A special form of |
|
29
|
|
|
|
|
|
|
L which holds the strings |
|
30
|
|
|
|
|
|
|
B or B |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 METHODS |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=over |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item $b->convert($str) |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Converts a string into the string which will be stored. |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub convert { |
|
43
|
0
|
|
|
0
|
1
|
0
|
return $_[1] eq 'true'; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item $b->as_pdf() |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Converts the value to a PDF output form. |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub as_pdf { |
|
53
|
4
|
50
|
|
4
|
1
|
14
|
return $_[0]->{'val'}? 'true': 'false'; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=back |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |