| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Pod::Abstract::Serial; |
|
2
|
3
|
|
|
3
|
|
17
|
use strict; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
355
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.20'; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
my $serial_number = 0; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Pod::Abstract::Serial - generate a global sequence of serial numbers. |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Used to number Pod::Abstract::Node elements for identification. |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 BUGS |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
This will cause problems with Pod::Abstract documents frozen to disk |
|
18
|
|
|
|
|
|
|
using Data::Dumper etc, unless C is used to bump the number above |
|
19
|
|
|
|
|
|
|
the highest number read. |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Or just serialise your document with C<< $node->pod >> instead! |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub next { |
|
26
|
43
|
|
|
43
|
0
|
287
|
return ++$serial_number; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub last { |
|
30
|
0
|
|
|
0
|
0
|
|
return $serial_number; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub set { |
|
34
|
0
|
|
|
0
|
0
|
|
$serial_number = shift; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 AUTHOR |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Ben Lilburne |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Copyright (C) 2009 Ben Lilburne |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
|
46
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |