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#======================================================================= 16package PDF::Builder::Basic::PDF::Number; 17 18use base 'PDF::Builder::Basic::PDF::String'; 19 20use strict; 21use warnings; 22 23our $VERSION = '3.023'; # VERSION 24our $LAST_UPDATE = '3.022'; # manually update whenever code is changed 25 26=head1 NAME 27 28PDF::Builder::Basic::PDF::Number - Numbers in PDF. Inherits from L<PDF::Builder::Basic::PDF::String> 29 30=head1 METHODS 31 32=head2 $n->convert($str) 33 34Converts a string from PDF to internal, by doing nothing 35 36=cut 37 38sub convert { 39 return $_[1]; 40} 41 42=head2 $n->as_pdf() 43 44Converts a number to PDF format 45 46=cut 47 48sub as_pdf { 49 return $_[0]->{'val'}; 50} 51 521; 53