Condition Coverage

blib/lib/App/MHFS.pm
Criterion Covered Total %
condition 0 440 0.0


and 3 conditions

line !l l&&!r l&&r condition
163 0 0 0 defined $self->{'timers'}[$i] and $timer->{'desired'} >= $self->{'timers'}[$i]{'desired'}
399 0 0 0 exists $settings->{'flush'} and $settings->{'flush'}
455 0 0 0 defined $settings->{$pluginname}{'enabled'} and not $settings->{$pluginname}{'enabled'}
910 0 0 0 $chardata->{'bytelength'} == 3 and $chardata->{'codepoint'} >= 55296
0 0 0 $chardata->{'bytelength'} == 3 and $chardata->{'codepoint'} >= 55296 and $chardata->{'codepoint'} <= 56319
912 0 0 0 $secondchar and $secondchar->{'bytelength'} == 3
0 0 0 $secondchar and $secondchar->{'bytelength'} == 3 and $secondchar->{'codepoint'} >= 56320
0 0 0 $secondchar and $secondchar->{'bytelength'} == 3 and $secondchar->{'codepoint'} >= 56320 and $secondchar->{'codepoint'} <= 57343
1036 0 0 0 $self->{'method'} ne "GET" and $self->{'method'} ne "HEAD"
0 0 0 $self->{'method'} ne "GET" and $self->{'method'} ne "HEAD" and $self->{'method'} ne "PUT"
1134 0 0 0 $self->{'client'}{'X-MHFS-PROXY-KEY'} and $self->{'header'}{'X-MHFS-PROXY-KEY'}
1153 0 0 0 $netmap and $self->{'ip'} >> 24 == $netmap->[0]
1160 0 0 0 defined $self->{'header'}{'Range'} and $self->{'header'}{'Range'} =~ /^bytes=([0-9]+)\-([0-9]*)$/
1208 0 0 0 $self->{'outheaders'}{'Transfer-Encoding'} and $self->{'outheaders'}{'Transfer-Encoding'} eq "chunked"
2009 0 0 0 $self->{'request'}{'outheaders'}{'Connection'} and $self->{'request'}{'outheaders'}{'Connection'} eq "close"
2074 0 0 0 $client->{'request'}{'outheaders'}{'Connection'} and $client->{'request'}{'outheaders'}{'Connection'} eq "close"
2140 0 0 0 $req_length and $filepos >= $req_length
2661 0 0 0 defined $self->{'fd'}{$key}{'fd'} and $fd == $self->{'fd'}{$key}{'fd'}
2885 0 0 0 $cidr >= 0 and $cidr <= 32
3039 0 0 0 substr($$contents, $foffset, 1) eq "e" and $nodestack[-1][0] eq 'l' || $nodestack[-1][0] eq 'd' && scalar(@{$nodestack[-1];}) % 2 == 1
3115 0 0 0 exists $opt->{'src'} and exists $opt->{'dest_metafile'}
0 0 0 exists $opt->{'src'} and exists $opt->{'dest_metafile'} and exists $opt->{'tracker'}
3153 0 0 0 $valuetype and $node->[0] ne $valuetype
3427 0 0 0 defined $file and defined $size
3747 0 0 0 defined $request->{'qs'}{'fmt'} and $request->{'qs'}{'fmt'} eq "wav"
3808 0 0 0 $request->{'qs'}{'action'} and $request->{'qs'}{'action'} eq "dl"
3937 0 0 0 $samplerate <= $max_sample_rate and $inbitdepth <= $bitdepth
3951 0 0 0 $setting->[0] <= $bitdepth and $setting->[1] <= $max_sample_rate
3972 0 0 0 $rate <= $samplerate and $rate <= $max_sample_rate
4336 0 0 0 $request->{'qs'}{'media'} and $request->{'qs'}{'media'} eq "music"
4495 0 0 0 defined $qs->{'media'} and defined $self->{'fmts'}{$qs->{'media'}}
4685 0 0 0 exists $request->{'qs'}{'compact'} and $request->{'qs'}{'compact'} eq 0
4750 0 0 0 $values[0] == $netmap->[1] and unpack("C", $ipport) != $netmap->[1]
0 0 0 $netmap and ($values[0] == $netmap->[1] and unpack("C", $ipport) != $netmap->[1])
0 0 0 $netmap and ($values[0] == $netmap->[1] and unpack("C", $ipport) != $netmap->[1]) and $pubip
4780 0 0 0 $settings->{'BitTorrent::Tracker'} && $settings->{'BitTorrent::Tracker'}{'announce_interval'}
4985 0 0 0 exists $request->{'qs'}{'dlsubsystem'} and exists $request->{'qs'}{'privdata'}
5567 0 0 0 $videoformats->{$fmt}{'lock'} == 1 and LOCK_WRITE($video{'out_filepath'}) != 1
5606 0 0 0 defined $minsize and -s $filename < $minsize
5672 0 0 0 $subm3u and -e $reqsub
5782 0 0 0 $lastelm and defined $lastelm->{'size'}
0 0 0 $lastelm and defined $lastelm->{'size'} and $amount > $lastelm->{'size'}
5800 0 0 0 $ebml->{'elements'} > 0 and $ebml->{'elements'}[-1]{'size'}
0 0 0 $ebml->{'elements'} > 0 and $ebml->{'elements'}[-1]{'size'} and $position > $ebml->{'elements'}[-1]{'size'}
6163 0 0 0 $headread and $headread == 4
6172 0 0 0 $dataread and $dataread == $size
6208 0 0 0 $magic and $magic == 4
6472 0 0 0 defined $tt and $tt->{'value'} == 2
6483 0 0 0 defined $tt and $tt->{'value'} == 1
6561 0 0 0 $block and $block->{'trackno'} == $tid
6798 0 0 0 $matroska->{'ebml'}{'elements'}[0]{'id'} == 408125543 and $matroska->{'ebml'}{'elements'}[0]{'size'} == 0

or 2 conditions

line l !l condition
269 0 0 $loop_interval // -1
328 0 0 $loop_interval //= -1
569 0 0 $lockdata //= "99999999999"
700 0 0 $options->{'min_file_size'} //= 0
1124 0 0 $self->{'header'}{'Host'} // ""
1195 0 0 $datalength //= '99999999999'
1262 0 0 $size // "*"
1313 0 0 $self->{'outheaders'}{'Accept-Ranges'} //= "bytes"
1315 0 0 $self->{'outheaders'}{'Connection'} //= "keep-alive"
1334 0 0 $dataitem->{'get_current_length'} //= sub { return undef; }
1470 0 0 $locksz || 0
1474 0 0 &$get_current_size() || 0
1600 0 0 $self->{'header'}{'_RangeStart'} // 0
2450 0 0 $oldenvvars{$key} // "{undef}"
2451 0 0 $env->{$key} // "{undef}"
2468 0 0 $env->{$key} // "{undef}"
2469 0 0 $oldenvvars{$key} // "{undef}"
2709 0 0 $type // "undef"
2734 0 0 &reftype($value) // "SCALAR"
2827 0 0 $ENV{'XDG_CONFIG_DIRS'} || '/etc/xdg'
2851 0 0 $SETTINGS->{'HOST'} ||= "127.0.0.1"
2852 0 0 $SETTINGS->{'PORT'} ||= 8000
2854 0 0 $SETTINGS->{'ALLOWED_REMOTEIP_HOSTS'} ||= [["127.0.0.1"]]
2882 0 0 $2 // 32
2909 0 0 $SETTINGS->{'XSEND'} //= 0
2972 0 0 $SETTINGS->{'TIMEOUT'} ||= 75
3582 0 0 $where //= ""
3781 0 0 $request->{'header'}{'_RangeStart'} || 0
3929 0 0 $request->{'qs'}{'max_sample_rate'} // 192000
4402 0 0 uri_escape($request->{'qs'}{'q'}) // ""
0 0 $request->{'qs'}{'maxResults'} // 25
4420 0 0 $request->{'qs'}{'fmt'} //= "html"
4449 0 0 $qs->{'media'} // "video"
0 0 $self->{'fmts'}{$qs->{'media'} // "video"} // "best"
4522 0 0 $request->{'qs'}{'media'} //= "music"
4528 0 0 $request->{'qs'}{'media'} //= "music"
4631 0 0 $self->{'torrents'}{pack "H*", $asciihash} //= {}
4781 0 0 $ai //= 1800
5119 0 0 $request->{'qs'}{'vfmt'} // "noconv"
5129 0 0 $request->{'qs'}{'fmt'} // "m3u8"
5501 0 0 $qs->{'fmt'} //= "noconv"
6897 0 0 $qs->{'action'} //= "library"
6901 0 0 $qs->{'library'} //= "all"

or 3 conditions

line l !l&&r !l&&!r condition
482 0 0 0 $self->{'resources'}{$filename} //= MHFS::Util::read_file($filename)
815 0 0 0 $combined{$ext} // $combined{'bin'}
1122 0 0 0 not $self->{'header'}{'Host'} or $self->{'header'}{'Host'} ne $self->{'client'}{'serverhostname'}
1190 0 0 0 $self->{'client'}{'absurl'} // (defined $self->{'header'}{'Host'} ? "http://" . $self->{'header'}{'Host'} : undef)
1196 0 0 0 $self->{'header'}{'_RangeEnd'} // $datalength - 1
1314 0 0 0 $self->{'outheaders'}{'Connection'} //= $self->{'header'}{'Connection'}
1538 0 0 0 $mime //= getMIME($filename)
1564 0 0 0 $self->{'header'}{'_RangeEnd'} // $size - 1
1599 0 0 0 not $options->{'code'} or $options->{'code'} == 206
1601 0 0 0 $self->{'header'}{'_RangeEnd'} // $bytesize - 1
1711 0 0 0 not defined $requestfile or rindex($requestfile, $droot, 0) != 0
1752 0 0 0 not defined $requestfile or rindex($requestfile, $ml, 0) != 0
1773 0 0 0 $filename eq "." or $filename eq ".."
1961 0 0 0 $!{'EAGAIN'} or $!{'EWOULDBLOCK'}
1978 0 0 0 $self->{'request'} //= "MHFS::HTTP::Server::Client::Request"->new($self)
2122 0 0 0 $client->{'sendresponsetimerid'} //= $client->AddClientCloseTimer($client->{'server'}{'settings'}{'sendresponsetimeout'}, $client->{'CONN-ID'})
2717 0 0 0 $raw or $noindent
2819 0 0 0 $FALLBACK_DATA_ROOT // $ENV{'HOME'}
2820 0 0 0 $cfg_fallback //= $ENV{'APPDATA'} . "/mhfs"
2824 0 0 0 $XDG_CONFIG_HOME //= $cfg_fallback . "/.config"
2835 0 0 0 $CFGDIR //= $XDG_CONFIG_HOME . "/mhfs"
2866 0 0 0 $SETTINGS->{'APPDIR'} || dist_dir('App-MHFS')
0 0 0 $APPDIR ||= $SETTINGS->{'APPDIR'} || dist_dir('App-MHFS')
2872 0 0 0 $SETTINGS->{'FALLBACK_DATA_ROOT'} || $ENV{'HOME'}
0 0 0 $FALLBACK_DATA_ROOT ||= $SETTINGS->{'FALLBACK_DATA_ROOT'} || $ENV{'HOME'}
2873 0 0 0 $FALLBACK_DATA_ROOT ||= $ENV{'APPDATA'} . "/mhfs"
2911 0 0 0 $tmpdir ||= $ENV{'XDG_CACHE_HOME'} . "/mhfs"
2912 0 0 0 $tmpdir ||= "$FALLBACK_DATA_ROOT/.cache/mhfs"
2924 0 0 0 $datadir ||= $ENV{'XDG_DATA_HOME'} . "/mhfs"
2925 0 0 0 $datadir ||= "$FALLBACK_DATA_ROOT/.local/share/mhfs"
2928 0 0 0 $SETTINGS->{'MHFS_TRACKER_TORRENT_DIR'} ||= $SETTINGS->{'DATADIR'} . "/torrent"
2929 0 0 0 $SETTINGS->{'VIDEO_TMPDIR'} ||= $tmpdir . "/video"
2930 0 0 0 $SETTINGS->{'MUSIC_TMPDIR'} ||= $tmpdir . "/music"
2931 0 0 0 $SETTINGS->{'GENERIC_TMPDIR'} ||= $tmpdir . "/tmp"
2932 0 0 0 $SETTINGS->{'SECRET_TMPDIR'} ||= $tmpdir . "/secret"
2935 0 0 0 $SETTINGS->{'MEDIALIBRARIES'}{'movies'} ||= $SETTINGS->{'DOCUMENTROOT'} . "/media/movies"
0 0 0 $SETTINGS->{'MEDIALIBRARIES'}{'tv'} ||= $SETTINGS->{'DOCUMENTROOT'} . "/media/tv"
0 0 0 $SETTINGS->{'MEDIALIBRARIES'}{'music'} ||= $SETTINGS->{'DOCUMENTROOT'} . "/media/music"
2968 0 0 0 $SETTINGS->{'BINDIR'} ||= $APPDIR . "/bin"
2969 0 0 0 $SETTINGS->{'DOCDIR'} ||= $APPDIR . "/doc"
2974 0 0 0 $SETTINGS->{'recvrequestimeout'} ||= $SETTINGS->{'TIMEOUT'}
2976 0 0 0 $SETTINGS->{'sendresponsetimeout'} ||= $SETTINGS->{'TIMEOUT'}
2978 0 0 0 $SETTINGS->{'Torrent'}{'pyroscope'} ||= $FALLBACK_DATA_ROOT . "/.local/pyroscope"
3007 0 0 0 $type eq "d" or $type eq "l"
3039 0 0 0 $nodestack[-1][0] eq 'l' || $nodestack[-1][0] eq 'd' && scalar(@{$nodestack[-1];}) % 2 == 1
0 0 0 $nodestack[-1][0] ne "d" or scalar(@{$nodestack[-1];}) % 2 == 0
3055 0 0 0 $firstchar eq "d" or $firstchar eq "l"
3569 0 0 0 $file eq "." or $file eq ".."
3693 0 0 0 $ver < 68 or $request->{'header'}{'User-Agent'} =~ /Linux/
3782 0 0 0 $request->{'header'}{'_RangeEnd'} // $wavsize - 1
3868 0 0 0 defined $request->{'qs'}{'fmt'} || defined $request->{'qs'}{'max_sample_rate'} || defined $request->{'qs'}{'bitdepth'} || defined $request->{'qs'}{'part'}
3930 0 0 0 $request->{'qs'}{'bitdepth'} // ($max_sample_rate > 48000 ? 24 : 16)
3979 0 0 0 $desiredrate //= $max_sample_rate
4161 0 0 0 $last eq ".png" or $last eq ".jpg"
0 0 0 $last eq ".png" or $last eq ".jpg" or $last eq "jpeg"
4728 0 0 0 not defined $numwant or $numwant ne unpack("C", pack("C", $numwant))
0 0 0 not defined $numwant or $numwant ne unpack("C", pack("C", $numwant)) or $numwant > 55
4919 0 0 0 not defined $qs->{'playinbrowser'} or $qs->{'playinbrowser'} == 1
5183 0 0 0 $filename eq "." or $filename eq ".."
5244 0 0 0 $newitem eq "." or $newitem eq ".."
5291 0 0 0 $filename eq "." or $filename eq ".."
5372 0 0 0 $newitem eq "." or $newitem eq ".."
6069 0 0 0 not defined $trackno or length $data < 3
6143 0 0 0 $track->{$id}{'value'} // $track->{$id}{'data'}
6442 0 0 0 $track{'CodecID_Major'} eq "EAC3" or $track{'CodecID_Major'} eq "AC3"
6559 0 0 0 $elm{'id'} == 163 or $elm{'id'} == 160
6849 0 0 0 $video->{'duration'} //= "PT$1H$2M$3.$4S"