File Coverage

blib/lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.pm
Criterion Covered Total %
statement 9 19 47.3
branch 0 4 0.0
condition 0 6 0.0
subroutine 3 9 33.3
pod 0 5 0.0
total 12 43 27.9


line stmt bran cond sub pod time code
1             package SOAP::Lite::Deserializer::XMLSchemaSOAP1_1;
2 25     25   108 use strict;
  25         36  
  25         4372  
3              
4 0     0 0   sub anyTypeValue { 'ur-type' }
5              
6             sub as_boolean {
7 0     0 0   shift;
8 0           my $value = shift;
9 0 0 0       $value eq '1' || $value eq 'true'
    0 0        
10             ? 1
11             : $value eq '0' || $value eq 'false'
12             ? 0
13             : die "Wrong boolean value '$value'\n"
14             }
15              
16 0     0 0   sub as_base64 { shift; require MIME::Base64; MIME::Base64::decode_base64(shift) }
  0            
  0            
17              
18 0     0 0   sub as_ur_type { $_[1] }
19              
20 0     0 0   sub as_anyURI { $_[1] }
21              
22             BEGIN {
23 25     25   176 no strict 'refs';
  25         36  
  25         2094  
24 25     25   70 for my $method (qw(
25             string float double decimal timeDuration recurringDuration uriReference
26             integer nonPositiveInteger negativeInteger long int short byte
27             nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte
28             positiveInteger timeInstant time timePeriod date month year century
29             recurringDate recurringDay language
30 750     0   757 )) { my $name = 'as_' . $method; *$name = sub { $_[1] } }
  750         3581  
  0            
31             }
32              
33             1;