Diff of /trunk/lib/SOAP/Lite/Deserializer/XMLSchema1999.pm [r418] .. [r419]  Maximize  Restore

Switch to unified view

a/trunk/lib/SOAP/Lite/Deserializer/XMLSchema1999.pm b/trunk/lib/SOAP/Lite/Deserializer/XMLSchema1999.pm
...
...
8
# use as_string and as_boolean from SOAP1_1 Deserializer
8
# use as_string and as_boolean from SOAP1_1 Deserializer
9
9
10
sub as_string; *as_string = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_string;
10
sub as_string; *as_string = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_string;
11
sub as_boolean; *as_boolean = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_boolean;
11
sub as_boolean; *as_boolean = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_boolean;
12
12
13
sub as_hex { 
13
sub as_hex {
14
    shift; 
14
    shift;
15
    my $value = shift; 
15
    my $value = shift;
16
    $value =~ s/([a-zA-Z0-9]{2})/chr oct '0x'.$1/ge; 
16
    $value =~ s/([a-zA-Z0-9]{2})/chr oct '0x'.$1/ge;
17
    $value 
17
    $value
18
}
18
}
19
19
20
sub as_ur_type { $_[1] }
20
sub as_ur_type { $_[1] }
21
21
22
sub as_undef {
22
sub as_undef {
23
    shift;
23
    shift;
24
    my $value = shift;
24
    my $value = shift;
25
    $value eq '1' || $value eq 'true'
25
    $value eq '1' || $value eq 'true'
26
        ? 1 
26
        ? 1
27
        : $value eq '0' || $value eq 'false'
27
        : $value eq '0' || $value eq 'false'
28
            ? 0 
28
            ? 0
29
            : die "Wrong null/nil value '$value'\n";
29
            : die "Wrong null/nil value '$value'\n";
30
}
30
}
31
31
32
BEGIN {
32
BEGIN {
33
    no strict 'refs';
33
    no strict 'refs';
...
...
41
        my $name = 'as_' . $method;
41
        my $name = 'as_' . $method;
42
        *$name = sub { $_[1] };
42
        *$name = sub { $_[1] };
43
    }
43
    }
44
}
44
}
45
45
46
1;
46
1;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks