Pod::Abstract::Serial - generate a global sequence of serial numbers.


Pod-Abstract documentation Contained in the Pod-Abstract distribution.

Index


Code Index:

NAME

Top

Pod::Abstract::Serial - generate a global sequence of serial numbers.

DESCRIPTION

Top

Used to number Pod::Abstract::Node elements for identification.

BUGS

Top

This will cause problems with Pod::Abstract documents frozen to disk using Data::Dumper etc, unless set is used to bump the number above the highest number read.

Or just serialise your document with $node->pod instead!

AUTHOR

Top

Ben Lilburne <bnej@mac.com>

COPYRIGHT AND LICENSE

Top


Pod-Abstract documentation Contained in the Pod-Abstract distribution.
package Pod::Abstract::Serial;
use strict;
our $VERSION = '0.20';

my $serial_number = 0;

sub next {
    return ++$serial_number;
}

sub last {
    return $serial_number;
}

sub set {
    $serial_number = shift;
}

1;