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 38     38   1008 use strict;
  38         79  
  38         1316  
3 38     38   201 use warnings;
  38         84  
  38         6870  
4              
5             sub serialize {
6 8     8 0 2613 my ($self, $opt) = @_;
7 8 100       34 $opt = {} if not $opt;
8 8         50 my $value = $self->get_value();
9 8 100       78 return $self->start_tag({ %$opt, nil => 1 }) if not defined $value;
10 6 100       26 $value = [ $value ] if not ref $value;
11 6         87 return join q{}, $self->start_tag($opt, $value)
12 6         77 , join( q{ }, @{ $value } )
13             , $self->end_tag($opt, $value);
14             }
15             1;
16              
17             __END__