line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#=======================================================================
|
2
|
|
|
|
|
|
|
# ____ ____ _____ _ ____ ___ ____
|
3
|
|
|
|
|
|
|
# | _ \| _ \| ___| _ _ / \ | _ \_ _| |___ \
|
4
|
|
|
|
|
|
|
# | |_) | | | | |_ (_) (_) / _ \ | |_) | | __) |
|
5
|
|
|
|
|
|
|
# | __/| |_| | _| _ _ / ___ \| __/| | / __/
|
6
|
|
|
|
|
|
|
# |_| |____/|_| (_) (_) /_/ \_\_| |___| |_____|
|
7
|
|
|
|
|
|
|
#
|
8
|
|
|
|
|
|
|
# A Perl Module Chain to faciliate the Creation and Modification
|
9
|
|
|
|
|
|
|
# of High-Quality "Portable Document Format (PDF)" Files.
|
10
|
|
|
|
|
|
|
#
|
11
|
|
|
|
|
|
|
#=======================================================================
|
12
|
|
|
|
|
|
|
#
|
13
|
|
|
|
|
|
|
# THIS IS A REUSED PERL MODULE, FOR PROPER LICENCING TERMS SEE BELOW:
|
14
|
|
|
|
|
|
|
#
|
15
|
|
|
|
|
|
|
#
|
16
|
|
|
|
|
|
|
# Copyright Martin Hosken
|
17
|
|
|
|
|
|
|
#
|
18
|
|
|
|
|
|
|
# No warranty or expression of effectiveness, least of all regarding
|
19
|
|
|
|
|
|
|
# anyone's safety, is implied in this software or documentation.
|
20
|
|
|
|
|
|
|
#
|
21
|
|
|
|
|
|
|
# This specific module is licensed under the Perl Artistic License.
|
22
|
|
|
|
|
|
|
#
|
23
|
|
|
|
|
|
|
#
|
24
|
|
|
|
|
|
|
# $Id: Bool.pm,v 2.0 2005/11/16 02:16:00 areibens Exp $
|
25
|
|
|
|
|
|
|
#
|
26
|
|
|
|
|
|
|
#=======================================================================
|
27
|
|
|
|
|
|
|
package PDF::API3::Compat::API2::Basic::PDF::Bool;
|
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
|
6
|
use strict;
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
127
|
|
30
|
1
|
|
|
1
|
|
7
|
use vars qw(@ISA);
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
31
|
1
|
|
|
1
|
|
6
|
no warnings qw[ deprecated recursion uninitialized ];
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
32
|
|
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
5
|
use PDF::API3::Compat::API2::Basic::PDF::String;
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
124
|
|
34
|
|
|
|
|
|
|
@ISA = qw(PDF::API3::Compat::API2::Basic::PDF::String);
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
PDF::API3::Compat::API2::Basic::PDF::Bool - A special form of L which holds the strings
|
39
|
|
|
|
|
|
|
B or B
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 METHODS
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 $b->convert($str)
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Converts a string into the string which will be stored.
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub convert
|
50
|
0
|
|
|
0
|
1
|
|
{ return $_[1] eq "true"; }
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 as_pdf
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Converts the value to a PDF output form
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub as_pdf
|
60
|
0
|
0
|
|
0
|
1
|
|
{ $_[0]->{'val'} ? "true" : "false"; }
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub outxmldeep
|
63
|
|
|
|
|
|
|
{
|
64
|
0
|
|
|
0
|
0
|
|
my ($self, $fh, $pdf, %opts) = @_;
|
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
$opts{-xmlfh}->print("".$self->as_pdf."\n");
|
67
|
|
|
|
|
|
|
}
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1;
|
70
|
|
|
|
|
|
|
|