| 1 | # Code in the PDF::API2::Basic::PDF namespace was originally copied from the | ||||||||||
| 2 | # Text::PDF distribution. | ||||||||||
| 3 | # | ||||||||||
| 4 | # Copyright Martin Hosken <Martin_Hosken@sil.org> | ||||||||||
| 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::Bool; | ||||||||||
| 10 | |||||||||||
| 11 | 40 | ▶ | use base 'PDF::API2::Basic::PDF::String'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 40 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 40 | our $VERSION = '2.044'; # VERSION | |||||||||
| 16 | |||||||||||
| 17 | =head1 NAME | ||||||||||
| 18 | |||||||||||
| 19 | PDF::API2::Basic::PDF::Bool - Low-level PDF boolean object | ||||||||||
| 20 | B<true> or B<false> | ||||||||||
| 21 | |||||||||||
| 22 | =head1 METHODS | ||||||||||
| 23 | |||||||||||
| 24 | =head2 $b->convert($str) | ||||||||||
| 25 | |||||||||||
| 26 | Converts a string into the string which will be stored. | ||||||||||
| 27 | |||||||||||
| 28 | =cut | ||||||||||
| 29 | |||||||||||
| 30 | sub convert { | ||||||||||
| 31 | 0 | ▶ | return $_[1] eq 'true'; | ||||||||
|
Subroutine
convert: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | =head2 as_pdf | ||||||||||
| 35 | |||||||||||
| 36 | Converts the value to a PDF output form | ||||||||||
| 37 | |||||||||||
| 38 | =cut | ||||||||||
| 39 | |||||||||||
| 40 | sub as_pdf { | ||||||||||
| 41 | 2 | ▶ | return $_[0]->{'val'} ? 'true' : 'false'; | ||||||||
|
Subroutine
as_pdf: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | 40 | 1; | |||||||||