Journyx/SOAP/Encoding.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 36 CC 4 SCAR 25.1
CC
4
Cov
0%
_dec_typed
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 12.3
1 package Net::Journyx::SOAP::Encoding;
2 use strict;
3 use warnings;
4  
5 use base 'XML::Compile::SOAP';
6  
7 sub _dec_typed {
8 my ($self, $node, $type, $index) = @_;
9  
10 my ($prefix, $local) = $type =~ m/^(.*?)\:(.*)/ ? ($1, $2) : ('',$type);
11 return (shift)->SUPER::_dec_typed(@_) unless $prefix eq 'jxapi';
12  
13 # warn "manually decoding $type";
14  
15 my %res = ();
16 my @childs = grep $_->isa('XML::LibXML::Element'), $node->childNodes;
17 foreach my $children ( @childs ) {
18 my $name = $children->nodeName;
19 # warn "decoding $name of $type";
20 if ( $name eq 'id' ) {
21 $res{'_id'} = $self->_dec([$children], '', 0, 1);
22 } else {
23 $res{$name} = $self->_dec([$children], '', 0, 1);
24 }
25 }
26  
27 return { $local => \%res };
28 }
29  
30 1;