blib/lib/Net/Server.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 78 | 210 | 37.1 |
line | l | !l | condition |
---|---|---|---|
849 | 0 | 3 | $prop->{'children'} and scalar keys %{$$prop{"children"};} |
867 | 0 | 0 | defined $prop->{'children'} and scalar keys %{$$prop{"children"};} |
911 | 0 | 0 | $prop->{'leave_children_open_on_hup'} and scalar keys %{$$prop{"children"};} |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
71 | 0 | 0 | 13 | $self->allow_deny($c) && $self->allow_deny_hook($c) |
106 | 0 | 0 | 70 | $script =~ m[^[^/]+/] and $ENV{'PWD'} |
116 | 73 | 0 | 27 | $_[0] && ref $_[0] |
135 | 70 | 0 | 0 | defined $prop->{'log_level'} and $prop->{'log_level'} =~ /^\d+$/ |
164 | 70 | 0 | 0 | length $prop->{'log_file'} and not $prop->{'log_function'} |
186 | 70 | 0 | 0 | $prop->{'reverse_lookups'} and $prop->{'reverse_lookups'} =~ /^(?:double|2)(.*)$/i |
254 | 0 | 62 | 7 | ref $ports and not @$ports |
256 | 7 | 0 | 0 | ref $ports and not @$ports |
270 | 0 | 100 | 0 | $port ne 0 and $bound{"$host\e$port\e$proto\e$ipv"}++ |
501 | 6 | 0 | 3 | $client->can("tie_stdout") and $client->tie_stdout |
526 | 0 | 0 | 0 | $prop->{'log_level'} and 3 <= $prop->{'log_level'} |
557 | 0 | 12 | 0 | $addr and $prop->{'reverse_lookups'} |
558 | 0 | 0 | 0 | $INC{'Socket6.pm'} and "Socket6"->can("getnameinfo") |
566 | 0 | 0 | 0 | $prop->{'peerhost'} and $prop->{'double_reverse_lookups'} |
574 | 0 | 12 | 0 | $prop->{'log_level'} and 3 <= $prop->{'log_level'} |
585 | 0 | 13 | 0 | $sock and $sock->NS_proto =~ /^UNIX/ |
604 | 0 | 0 | 0 | $prop->{'reverse_lookups'} and defined $prop->{'peerhost'} |
0 | 0 | 0 | $prop->{'reverse_lookups'} and defined $prop->{'peerhost'} and $prop->{'peerhost'} =~ /^$_$/ | |
615 | 0 | 0 | 0 | $prop->{'reverse_lookups'} and defined $prop->{'peerhost'} |
0 | 0 | 0 | $prop->{'reverse_lookups'} and defined $prop->{'peerhost'} and $prop->{'peerhost'} =~ /^$_$/ | |
636 | 0 | 0 | 0 | $orig_addr && $orig_addr ne $addr |
761 | 9 | 3 | 0 | defined $prop->{'ppid'} and $prop->{'ppid'} != $$ |
12 | 0 | 0 | defined $prop->{'ppid'} and $prop->{'ppid'} != $$ and not defined $prop->{'no_close_by_child'} | |
772 | 12 | 0 | 0 | $prop->{'kind_quit'} and $prop->{'children'} |
784 | 12 | 0 | 0 | $prop->{'_HUP'} and $prop->{'leave_children_open_on_hup'} |
792 | 10 | 0 | 2 | defined $prop->{'lock_file'} and -e $prop->{'lock_file'} |
10 | 0 | 2 | defined $prop->{'lock_file'} and -e $prop->{'lock_file'} and defined $prop->{'lock_file_unlink'} | |
797 | 12 | 0 | 0 | defined $prop->{'pid_file'} and -e $prop->{'pid_file'} |
12 | 0 | 0 | defined $prop->{'pid_file'} and -e $prop->{'pid_file'} and not $prop->{'_HUP'} | |
0 | 0 | 0 | defined $prop->{'pid_file'} and -e $prop->{'pid_file'} and not $prop->{'_HUP'} and defined $prop->{'pid_file_unlink'} | |
948 | 0 | 68 | 25 | $level =~ /^\d+$/ and $level > $prop->{'log_level'} |
954 | 0 | 0 | 0 | $prop->{'log_class'} and $prop->{'log_class'}->can("handle_error") |
1026 | 106 | 0 | 27 | $template and ref $template |
1034 | 5 | 13 | 318 | $args->[$i] =~ /^(?:--)?(\w+)(?:[=\ ](\S+))?$/ and exists $template->{$1} |
1039 | 33 | 282 | 0 | $args->[$i] and $args->[$i] =~ /^--\w+/ |
1044 | 280 | 26 | 9 | ref $val eq "ARRAY" and @$val == 1 |
306 | 9 | 0 | ref $val eq "ARRAY" and @$val == 1 and ref $template->{$key} ne "ARRAY" |
line | l | !l | condition |
---|---|---|---|
35 | 71 | 0 | shift() || die('Missing class') |
87 | 73 | 0 | $self->{'server'} ||= {} |
100 | 73 | 70 | $self->{'server'}{'commandline'} || die('commandline was not set during initialization') |
124 | 92 | 0 | $self->default_values || {} |
184 | 0 | 0 | $prop->{'reverse_lookups'} ||= 1 |
186 | 0 | 0 | $1 || $prop->{'double_reverse_lookups'} || 1 |
443 | 7 | 0 | $self->accept_multi_port || (next) |
534 | 0 | 0 | $ENV{'REMOTE_HOST'} || '0.0.0.0' |
628 | 0 | 0 | $self->{'server'}{'double_reverse_lookups'} || '' |
819 | 0 | 12 | $exit_val || 0 |
996 | 106 | 0 | shift() || {} |
1122 | 3 | 0 | $self->{'server'}{'sig_passthrough'} || [] |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
147 | 0 | 0 | 69 | $prop->{'setsid'} or length $prop->{'log_file'} |
154 | 0 | 0 | 70 | $prop->{'setsid'} or $prop->{'background'} |
209 | 0 | 0 | 0 | $file =~ /::/ or grep {-e "$_/$file";} @INC |
238 | 0 | 3 | 0 | delete $prop->{'_recursive_multitype'} || 'Net::Server::MultiType'->net_server_type |
253 | 69 | 0 | 0 | $ports ||= $prop->{'ports'} |
254 | 0 | 7 | 62 | not defined $ports or ref $ports and not @$ports |
256 | 0 | 0 | 7 | not defined $ports or ref $ports and not @$ports |
333 | 6 | 1 | 5 | @{$prop->{'sock'};} > 1 or $prop->{'multi_port'} |
371 | 0 | 0 | 13 | $prop->{'group'} ne $) or $prop->{'user'} ne $> |
487 | 12 | 0 | 0 | shift() || $prop->{'client'} |
501 | 1 | 3 | 6 | $prop->{'tie_client_stdout'} or $client->can("tie_stdout") and $client->tie_stdout |
522 | 12 | 0 | 0 | shift() || $prop->{'client'} |
582 | 12 | 1 | 0 | shift() || $prop->{'client'} |
599 | 0 | 0 | 13 | @{$prop->{'allow'};} or @{$prop->{'deny'};} |
0 | 0 | 13 | @{$prop->{'allow'};} or @{$prop->{'deny'};} or @{$prop->{'cidr_allow'};} | |
0 | 0 | 13 | @{$prop->{'allow'};} or @{$prop->{'deny'};} or @{$prop->{'cidr_allow'};} or @{$prop->{'cidr_deny'};} | |
637 | 0 | 0 | 0 | $rev_addrs->{$addr} || $rev_addrs->{$orig_addr} |
659 | 1 | 0 | 0 | shift() || $prop->{'client'} |
853 | 4 | 0 | 0 | kill "TERM", $pid or not kill(0, $pid) |
891 | 0 | 0 | 0 | POSIX::dup($sock->fileno) || $self->fatal("Cannot duplicate the socket [$!]") |
1027 | 27 | 106 | 0 | $_[2] or scalar keys %$template |
106 | 0 | 0 | $_[2] or scalar keys %$template or $self->{'server'}{'_no_options'}++ | |
1039 | 0 | 0 | 315 | $i > $#$args or $args->[$i] and $args->[$i] =~ /^--\w+/ |