line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::PDF::Null; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Text::PDF::Null - PDF Null type object. This is a subclass of |
6
|
|
|
|
|
|
|
Text::PDF::Objind and cannot be subclassed. |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 METHODS |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=cut |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
3
|
use vars qw(@ISA); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
127
|
|
15
|
|
|
|
|
|
|
@ISA = qw(Text::PDF::Objind); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# There is only one null object (section 3.2.8). |
18
|
|
|
|
|
|
|
my ($null_obj) = {}; |
19
|
|
|
|
|
|
|
bless $null_obj, "Text::PDF::Null"; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 Text::PDF::Null->new |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Returns the null object. There is only one null object. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new { |
29
|
0
|
|
|
0
|
1
|
|
return $null_obj; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 $s->realise |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Pretends to finish reading the object. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub realise { |
39
|
0
|
|
|
0
|
1
|
|
return $null_obj; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 $s->outobjdeep |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Output the object in PDF format. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub outobjdeep |
49
|
|
|
|
|
|
|
{ |
50
|
0
|
|
|
0
|
1
|
|
my ($self, $fh, $pdf) = @_; |
51
|
0
|
|
|
|
|
|
$fh->print ("null"); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 $s->is_obj |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Returns false because null is not a full object. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub is_obj { |
61
|
0
|
|
|
0
|
1
|
|
return 0; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 $s->copy |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Another no-op. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub copy { |
71
|
0
|
|
|
0
|
1
|
|
return $null_obj; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 $s->val |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Return undef. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub val |
81
|
|
|
|
|
|
|
{ |
82
|
0
|
|
|
0
|
1
|
|
return undef; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |