PDF::API3::Compat::API2::Basic::PDF::Null - PDF Null type object. This is a subclass of


PDF-API3 documentation Contained in the PDF-API3 distribution.

Index


Code Index:

NAME

Top

PDF::API3::Compat::API2::Basic::PDF::Null - PDF Null type object. This is a subclass of PDF::API3::Compat::API2::Basic::PDF::Objind and cannot be subclassed.

METHODS

Top

PDF::API3::Compat::API2::Basic::PDF::Null->new

Returns the null object. There is only one null object.

$s->realise

Pretends to finish reading the object.

$s->outobjdeep

Output the object in PDF format.

$s->is_obj

Returns false because null is not a full object.

$s->copy

Another no-op.

$s->val

Return undef.


PDF-API3 documentation Contained in the PDF-API3 distribution.
#=======================================================================
#    ____  ____  _____              _    ____ ___   ____
#   |  _ \|  _ \|  ___|  _   _     / \  |  _ \_ _| |___ \
#   | |_) | | | | |_    (_) (_)   / _ \ | |_) | |    __) |
#   |  __/| |_| |  _|    _   _   / ___ \|  __/| |   / __/
#   |_|   |____/|_|     (_) (_) /_/   \_\_|  |___| |_____|
#
#   A Perl Module Chain to faciliate the Creation and Modification
#   of High-Quality "Portable Document Format (PDF)" Files.
#
#=======================================================================
#
#   THIS IS A REUSED PERL MODULE, FOR PROPER LICENCING TERMS SEE BELOW:
#
#
#   Copyright Martin Hosken <Martin_Hosken@sil.org>
#
#   No warranty or expression of effectiveness, least of all regarding
#   anyone's safety, is implied in this software or documentation.
#
#   This specific module is licensed under the Perl Artistic License.
#
#
#   $Id: Null.pm,v 2.0 2005/11/16 02:16:00 areibens Exp $
#
#=======================================================================
package PDF::API3::Compat::API2::Basic::PDF::Null;

use strict;

use vars qw(@ISA);
@ISA = qw(PDF::API3::Compat::API2::Basic::PDF::Objind);

no warnings qw[ deprecated recursion uninitialized ];

# There is only one null object  (section 3.2.8).
my ($null_obj) = {};
bless $null_obj, "PDF::API3::Compat::API2::Basic::PDF::Null";


sub new {
    return $null_obj;
}

sub realise {
    return $null_obj;
}

sub outobjdeep
{
    my ($self, $fh, $pdf) = @_;
    $fh->print ("null");
}

sub outxmldeep
{
    my ($self, $fh, $pdf, %opts) = @_;

    $opts{-xmlfh}->print("<Null/>\n");
}

sub is_obj {
    return 0;
}

sub copy {
    return $null_obj;
}

sub val
{
    return undef;
}

1;