line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Code in the PDF::API2::Basic::PDF namespace was originally copied from the |
2
|
|
|
|
|
|
|
# Text::PDF distribution. |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Copyright Martin Hosken |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Martin Hosken's code may be used under the terms of the MIT license. |
7
|
|
|
|
|
|
|
# Subsequent versions of the code have the same license as PDF::API2. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package PDF::API2::Basic::PDF::Number; |
10
|
|
|
|
|
|
|
|
11
|
40
|
|
|
40
|
|
289
|
use base 'PDF::API2::Basic::PDF::String'; |
|
40
|
|
|
|
|
85
|
|
|
40
|
|
|
|
|
3872
|
|
12
|
|
|
|
|
|
|
|
13
|
40
|
|
|
40
|
|
262
|
use strict; |
|
40
|
|
|
|
|
100
|
|
|
40
|
|
|
|
|
3535
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '2.044'; # VERSION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
PDF::API2::Basic::PDF::Number - Low-level PDF numeric object |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 METHODS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 $n->convert($str) |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Converts a string from PDF to internal, by doing nothing |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=cut |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub convert { |
30
|
82
|
|
|
82
|
1
|
282
|
return $_[1]; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 $n->as_pdf |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Converts a number to PDF format |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub as_pdf { |
40
|
589
|
|
|
589
|
1
|
1488
|
return $_[0]->{'val'}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |