| 1 | package Text::PDF::Bool; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use vars qw(@ISA); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | # no warnings qw(uninitialized); | ||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use Text::PDF::String; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | @ISA = qw(Text::PDF::String); | |||||||||
| 9 | |||||||||||
| 10 | =head1 NAME | ||||||||||
| 11 | |||||||||||
| 12 | PDF::Bool - A special form of L<PDF::String> which holds the strings | ||||||||||
| 13 | B<true> or B<false> | ||||||||||
| 14 | |||||||||||
| 15 | =head1 METHODS | ||||||||||
| 16 | |||||||||||
| 17 | =head2 $b->convert($str) | ||||||||||
| 18 | |||||||||||
| 19 | Converts a string into the string which will be stored. | ||||||||||
| 20 | |||||||||||
| 21 | =cut | ||||||||||
| 22 | |||||||||||
| 23 | sub convert | ||||||||||
| 24 | 0 | ▶ | { return $_[1] eq "true"; } | ||||||||
|
Subroutine
convert: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 25 | |||||||||||
| 26 | |||||||||||
| 27 | =head2 as_pdf | ||||||||||
| 28 | |||||||||||
| 29 | Converts the value to a PDF output form | ||||||||||
| 30 | |||||||||||
| 31 | =cut | ||||||||||
| 32 | |||||||||||
| 33 | sub as_pdf | ||||||||||
| 34 | 0 | ▶ | { $_[0]->{'val'} ? "true" : "false"; } | ||||||||
|
Subroutine
as_pdf: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 35 | |||||||||||
| 36 | 1 | 1; | |||||||||
| 37 | |||||||||||