| 1 | #======================================================================= | ||
| 2 | # | ||
| 3 | # THIS IS A REUSED PERL MODULE, FOR PROPER LICENCING TERMS SEE BELOW: | ||
| 4 | # | ||
| 5 | # Copyright Martin Hosken <Martin_Hosken@sil.org> | ||
| 6 | # | ||
| 7 | # No warranty or expression of effectiveness, least of all regarding | ||
| 8 | # anyone's safety, is implied in this software or documentation. | ||
| 9 | # | ||
| 10 | # This specific module is licensed under the Perl Artistic License. | ||
| 11 | # Effective 28 January 2021, the original author and copyright holder, | ||
| 12 | # Martin Hosken, has given permission to use and redistribute this module | ||
| 13 | # under the MIT license. | ||
| 14 | # | ||
| 15 | #======================================================================= | ||
| 16 | package PDF::Builder::Basic::PDF::Number; | ||
| 17 | |||
| 18 | 42 | ▶ | use base 'PDF::Builder::Basic::PDF::String'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 42 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 42 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | |||
| 23 | 42 | our $VERSION = '3.028'; # VERSION | |
| 24 | 42 | our $LAST_UPDATE = '3.027'; # manually update whenever code is changed | |
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | PDF::Builder::Basic::PDF::Number - Numbers in PDF | ||
| 29 | |||
| 30 | Inherits from L<PDF::Builder::Basic::PDF::String> | ||
| 31 | |||
| 32 | =head1 METHODS | ||
| 33 | |||
| 34 | =head2 convert | ||
| 35 | |||
| 36 | $n->convert($str) | ||
| 37 | |||
| 38 | =over | ||
| 39 | |||
| 40 | Converts a string from PDF to internal, by doing nothing | ||
| 41 | |||
| 42 | =back | ||
| 43 | |||
| 44 | =cut | ||
| 45 | |||
| 46 | 366 | ▶ | sub convert { |
|
Subroutine
convert: called CC=1 SCAR=0.0
Pod
documented
| |||
| 47 | 366 | return $_[1]; | |
| 48 | } | ||
| 49 | |||
| 50 | =head2 as_pdf | ||
| 51 | |||
| 52 | $n->as_pdf() | ||
| 53 | |||
| 54 | =over | ||
| 55 | |||
| 56 | Converts a number to PDF format | ||
| 57 | |||
| 58 | =back | ||
| 59 | |||
| 60 | =cut | ||
| 61 | |||
| 62 | 5260 | ▶ | sub as_pdf { |
|
Subroutine
as_pdf: called CC=1 SCAR=0.0
Pod
documented
| |||
| 63 | 5260 | return $_[0]->{'val'}; | |
| 64 | } | ||
| 65 | |||
| 66 | 42 | 1; | |