| 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 <Martin_Hosken@sil.org> | ||
| 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: Null.pm,v 2.0 2005/11/16 02:16:00 areibens Exp $ | ||
| 25 | # | ||
| 26 | #======================================================================= | ||
| 27 | package PDF::API3::Compat::API2::Basic::PDF::Null; | ||
| 28 | |||
| 29 | =head1 NAME | ||
| 30 | |||
| 31 | PDF::API3::Compat::API2::Basic::PDF::Null - PDF Null type object. This is a subclass of | ||
| 32 | PDF::API3::Compat::API2::Basic::PDF::Objind and cannot be subclassed. | ||
| 33 | |||
| 34 | =head1 METHODS | ||
| 35 | |||
| 36 | =cut | ||
| 37 | |||
| 38 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 39 | |||
| 40 | 1 | ▶ | use vars qw(@ISA); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 41 | 1 | @ISA = qw(PDF::API3::Compat::API2::Basic::PDF::Objind); | |
| 42 | |||
| 43 | 1 | ▶ | no warnings qw[ deprecated recursion uninitialized ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 44 | |||
| 45 | # There is only one null object (section 3.2.8). | ||
| 46 | 1 | my ($null_obj) = {}; | |
| 47 | 1 | bless $null_obj, "PDF::API3::Compat::API2::Basic::PDF::Null"; | |
| 48 | |||
| 49 | |||
| 50 | =head2 PDF::API3::Compat::API2::Basic::PDF::Null->new | ||
| 51 | |||
| 52 | Returns the null object. There is only one null object. | ||
| 53 | |||
| 54 | =cut | ||
| 55 | |||
| 56 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 57 | 0 | return $null_obj; | |
| 58 | } | ||
| 59 | |||
| 60 | =head2 $s->realise | ||
| 61 | |||
| 62 | Pretends to finish reading the object. | ||
| 63 | |||
| 64 | =cut | ||
| 65 | |||
| 66 | 0 | ▶ | sub realise { |
|
Subroutine
realise: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 67 | 0 | return $null_obj; | |
| 68 | } | ||
| 69 | |||
| 70 | =head2 $s->outobjdeep | ||
| 71 | |||
| 72 | Output the object in PDF format. | ||
| 73 | |||
| 74 | =cut | ||
| 75 | |||
| 76 | sub outobjdeep | ||
| 77 | 0 | ▶ | { |
|
Subroutine
outobjdeep: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 78 | 0 | my ($self, $fh, $pdf) = @_; | |
| 79 | 0 | $fh->print ("null"); | |
| 80 | } | ||
| 81 | |||
| 82 | sub outxmldeep | ||
| 83 | 0 | ▶ | { |
|
Subroutine
outxmldeep: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 84 | 0 | my ($self, $fh, $pdf, %opts) = @_; | |
| 85 | |||
| 86 | 0 | $opts{-xmlfh}->print("<Null/>\n"); | |
| 87 | } | ||
| 88 | |||
| 89 | =head2 $s->is_obj | ||
| 90 | |||
| 91 | Returns false because null is not a full object. | ||
| 92 | |||
| 93 | =cut | ||
| 94 | |||
| 95 | 0 | ▶ | sub is_obj { |
|
Subroutine
is_obj: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 96 | 0 | return 0; | |
| 97 | } | ||
| 98 | |||
| 99 | =head2 $s->copy | ||
| 100 | |||
| 101 | Another no-op. | ||
| 102 | |||
| 103 | =cut | ||
| 104 | |||
| 105 | 0 | ▶ | sub copy { |
|
Subroutine
copy: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 106 | 0 | return $null_obj; | |
| 107 | } | ||
| 108 | |||
| 109 | =head2 $s->val | ||
| 110 | |||
| 111 | Return undef. | ||
| 112 | |||
| 113 | =cut | ||
| 114 | |||
| 115 | sub val | ||
| 116 | 0 | ▶ | { |
|
Subroutine
val: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 117 | 0 | return undef; | |
| 118 | } | ||
| 119 | |||
| 120 | 1 | 1; | |