Text::PDF::Null - PDF Null type object. This is a subclass of


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

Index


Code Index:

NAME

Top

Text::PDF::Null - PDF Null type object. This is a subclass of Text::PDF::Objind and cannot be subclassed.

METHODS

Top

Text::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.


Text-PDF documentation Contained in the Text-PDF distribution.
package Text::PDF::Null;

  
use strict;

use vars qw(@ISA);
@ISA = qw(Text::PDF::Objind);

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


  
sub new {
    return $null_obj;
}

sub realise {
    return $null_obj;
}

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

sub is_obj {
    return 0;
}

  
sub copy {
    return $null_obj;
}

  
sub val
{
    return undef;
}

1;