| 1 | package MKDoc::XML::Decode::Numeric; | ||||||||||
| 2 | 7 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | sub process | ||||||||||
| 6 | 0 | ▶ | { | ||||||||
|
Subroutine
process: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 7 | 0 | ▶ | (@_ == 2) or warn "MKDoc::XML::Encode::process() should be called with two arguments"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 8 | |||||||||||
| 9 | 0 | my $class = shift; | |||||||||
| 10 | |||||||||||
| 11 | 0 | my $stuff = shift; | |||||||||
| 12 | 0 | ▶ | $stuff =~ s/^#// or return; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | |||||||||||
| 14 | # if hex, convert to hex | ||||||||||
| 15 | 0 | $stuff =~ s/^\[xX]([0-9a-fA-F])+$/hex($1)/e; | |||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | return unless ($stuff =~ /^\d+$/); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | 0 | return chr ($stuff); | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 7 | 1; | |||||||||
| 22 | |||||||||||
| 23 | __END__ | ||||||||||