File Coverage

blib/lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
Criterion Covered Total %
statement 13 13 100.0
branch 6 6 100.0
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 22 23 95.6


line stmt bran cond sub pod time code
1             package SOAP::WSDL::XSD::Typelib::Builtin::list;
2 40     40   1698 use strict;
  40         77  
  40         1969  
3 40     40   386 use warnings;
  40         74  
  40         9826  
4              
5             sub serialize {
6 8     8 0 2559 my ($self, $opt) = @_;
7 8 100       31 $opt = {} if not $opt;
8 8         44 my $value = $self->get_value();
9 8 100       70 return $self->start_tag({ %$opt, nil => 1 }) if not defined $value;
10 6 100       23 $value = [ $value ] if not ref $value;
11 6         85 return join q{}, $self->start_tag($opt, $value)
12 6         76 , join( q{ }, @{ $value } )
13             , $self->end_tag($opt, $value);
14             }
15             1;
16              
17             __END__