Branch Coverage

blib/lib/RPC/XML/Server.pm
Criterion Covered Total %
branch 43 228 18.8


line true false branch
103 8 0 eval { do { &load('Compress::Zlib'); 1 } } ? :
150 1 4 if (ref $class)
161 1 3 if (delete $args{'no_http'}) { }
173 1 2 $host ? :
0 3 $port ? :
3 0 $queue ? :
179 0 3 unless ($http)
217 0 4 $args{'parser'} ? :
224 1 3 unless (delete $args{'no_default'})
230 0 3 if (delete $args{'no_compress'}) { }
240 3 0 if ($self->{'__compress'})
247 3 0 $self->{'__compress'} ? :
266 0 3 if ($args{'fault_code_base'})
275 0 3 if ($args{'fault_table'})
282 0 0 ref $local_table->{$key} ? :
308 0 1 if ($self->{'__daemon'})
312 1 0 unless ($host = $self->host)
319 0 0 if ($port == 443) { }
0 0 elsif ($port == 80) { }
350 1 1 if ($set_started)
370 0 0 if (defined $value)
393 0 1 if ($path and ref $path eq 'ARRAY')
423 1 2 if (not ref $meth) { }
2 0 elsif (ref $meth eq 'HASH') { }
0 0 elsif (not &blessed($meth) && $meth->isa('RPC::XML::Procedure')) { }
426 0 0 if (not ref $val) { }
445 0 2 if (not my $class = $RPC::XML::Server::CLASS_MAP{lc $type}) { }
485 0 0 if (ref $meth eq 'HASH')
513 0 0 if (ref $meth eq 'HASH')
541 1 1 unless ('File::Spec'->file_name_is_absolute($file))
547 0 2 if (-f $path)
556 1 1 unless ('File::Spec'->file_name_is_absolute($file))
589 0 0 unless (defined $meth)
591 0 0 if ($self->{'__auto_methods'})
599 0 0 unless ($meth = $self->{'__method_table'}{$name})
605 0 0 if ($self->{'__auto_updates'} and $meth->{'file'} and $meth->{'mtime'} < (stat $meth->{'file'})[9])
610 0 0 unless (ref $ret)
646 1 0 if ($self->{'__daemon'}) { }
656 0 1 if (exists $args{'signal'} and $args{'signal'} ne 'NONE') { }
659 0 0 ref $args{'signal'} ? :
675 0 1 if ($exit_now)
679 0 1 unless ($conn)
691 0 0 if (not $eval_return and $@)
699 0 0 if (defined $timeout)
718 0 0 if ($_[$i] eq 'conf_file')
719 0 0 if ($_[$i] eq 'port')
720 0 0 if ($_[$i] eq 'host')
724 0 0 if (exists $self->{'conf_file'} and not $conf_file_flag)
732 0 0 unless ($conf_file_flag or $port_flag)
739 0 0 unless (eval { do { require Net::Server::MultiType; 1 } })
741 0 0 if ($@)
830 0 1 unless ($conn)
836 0 1 if (ref($conn) =~ /^Net::Server::Proto/)
841 0 0 if ($IO::Socket::SSL::VERSION and $RPC::XML::Server::IO_SOCKET_SSL_HACK_NEEDED)
847 0 0 unless (defined $Socket6::VERSION or defined $IO::Socket::INET6::VERSION)
864 0 1 if ($req->method eq 'HEAD') { }
1 0 elsif ($req->method eq 'POST') { }
878 0 0 if (($req->content_encoding || '') =~ $self->compress_re)
880 0 0 unless ($self->compress)
890 0 0 if (($req->content_encoding || '') =~ /chunked/i) { }
899 0 0 if ($do_compress)
902 0 0 unless ($com_engine = &Compress::Zlib::inflateInit())
914 0 0 if ($buf = $conn->read_buffer) { }
924 0 0 $length < 2048 ? :
926 0 0 unless ($read)
939 0 0 if ($do_compress)
941 0 0 unless ($buf = $com_engine->inflate($buf))
953 0 0 unless (eval { do { $parser->parse_more($buf); 1 } })
955 0 0 if ($@)
969 0 0 unless (eval { do { $reqxml = $parser->parse_done; 1 } })
971 0 0 if ($@)
985 0 0 if (ref $reqxml) { }
1005 0 0 if ($self->compress and $respxml->length > $self->compress_thresh and ($req->header('Accept-Encoding') || '') =~ $self->compress_re)
1015 0 0 if ($self->message_file_thresh and $self->message_file_thresh < $respxml->length) { }
1023 0 0 unless ($resp_fh)
1039 0 0 if ($do_compress) { }
1043 0 0 unless ($fh_compress)
1059 0 0 unless ($com_engine = &Compress::Zlib::deflateInit())
1073 0 0 unless (defined($out = $com_engine->deflate(\$buf)))
1082 0 0 unless (defined($out = $com_engine->flush))
1092 0 0 unless (close $fh_compress)
1107 0 0 unless (defined read($resp_fh, $buffer, 4096))
1119 0 0 if ($do_compress)
1133 0 0 if (not $eval and $@ and $@ =~ /Caught SIGPIPE/)
1176 0 0 if (ref $xml eq 'SCALAR') { }
0 0 elsif (ref $xml eq 'ARRAY') { }
0 0 elsif (&blessed($xml) and $xml->isa('RPC::XML::request')) { }
1179 0 0 unless (ref $reqobj)
1199 0 0 unless (ref $reqobj)
1212 0 0 if (ref $meth) { }
1215 0 0 unless ($name eq 'system.status' and @args and $args[0]->type eq 'boolean' and $args[0]->value)
1266 0 0 unless (ref $meth)
1320 0 1 if (@details)
1323 0 0 if ($details[0] =~ /^-?except/i)
1330 0 0 unless (/[.]xpl$/)
1339 0 1 unless (opendir $dh, $dir)
1349 0 0 $negate ? :
0 0 if ($detail and $negate ? $details{$file} : !$details{$file})
1356 0 0 unless (ref $ret)
1389 0 0 if ($name) { }
1391 0 0 if ($self->{'__method_table'}{$name})
1453 0 0 unless (&blessed($src_srv) and $src_srv->isa($pkg))
1457 0 0 unless (@names)
1469 0 0 if (ref $name eq 'Regexp') { }
1491 0 0 if (ref $meth) { }
1501 0 0 if (@missing) { }
1547 0 0 unless (&blessed($src_srv) and $src_srv->isa($pkg))
1551 0 0 unless (@names)
1563 0 0 if (ref $name eq 'Regexp') { }
1585 0 0 if (ref $meth) { }
1595 0 0 if (@missing) { }
1634 0 1 if ($timeout)
1664 0 0 if (my $fault = $self->{'__fault_table'}{$err}) { }
1666 0 0 if (ref $fault) { }