Condition Coverage

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


and 3 conditions

line !l l&&!r l&&r condition
159 0 0 0 defined $self->{'timers'}[$i] and $timer->{'desired'} >= $self->{'timers'}[$i]{'desired'}
394 0 0 0 exists $settings->{'flush'} and $settings->{'flush'}
450 0 0 0 defined $settings->{$pluginname}{'enabled'} and not $settings->{$pluginname}{'enabled'}
905 0 0 0 $chardata->{'bytelength'} == 3 and $chardata->{'codepoint'} >= 55296
0 0 0 $chardata->{'bytelength'} == 3 and $chardata->{'codepoint'} >= 55296 and $chardata->{'codepoint'} <= 56319
907 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
1031 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"
1129 0 0 0 $self->{'client'}{'X-MHFS-PROXY-KEY'} and $self->{'header'}{'X-MHFS-PROXY-KEY'}
1148 0 0 0 $netmap and $self->{'ip'} >> 24 == $netmap->[0]
1155 0 0 0 defined $self->{'header'}{'Range'} and $self->{'header'}{'Range'} =~ /^bytes=([0-9]+)\-([0-9]*)$/
1203 0 0 0 $self->{'outheaders'}{'Transfer-Encoding'} and $self->{'outheaders'}{'Transfer-Encoding'} eq "chunked"
2003 0 0 0 $self->{'request'}{'outheaders'}{'Connection'} and $self->{'request'}{'outheaders'}{'Connection'} eq "close"
2068 0 0 0 $client->{'request'}{'outheaders'}{'Connection'} and $client->{'request'}{'outheaders'}{'Connection'} eq "close"
2134 0 0 0 $req_length and $filepos >= $req_length
2655 0 0 0 defined $self->{'fd'}{$key}{'fd'} and $fd == $self->{'fd'}{$key}{'fd'}
2846 0 0 0 $cidr >= 0 and $cidr <= 32
3000 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
3076 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'}
3114 0 0 0 $valuetype and $node->[0] ne $valuetype
3388 0 0 0 defined $file and defined $size
3708 0 0 0 defined $request->{'qs'}{'fmt'} and $request->{'qs'}{'fmt'} eq "wav"
3769 0 0 0 $request->{'qs'}{'action'} and $request->{'qs'}{'action'} eq "dl"
3898 0 0 0 $samplerate <= $max_sample_rate and $inbitdepth <= $bitdepth
3912 0 0 0 $setting->[0] <= $bitdepth and $setting->[1] <= $max_sample_rate
3933 0 0 0 $rate <= $samplerate and $rate <= $max_sample_rate
4297 0 0 0 $request->{'qs'}{'media'} and $request->{'qs'}{'media'} eq "music"
4456 0 0 0 defined $qs->{'media'} and defined $self->{'fmts'}{$qs->{'media'}}
4646 0 0 0 exists $request->{'qs'}{'compact'} and $request->{'qs'}{'compact'} eq 0
4711 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
4741 0 0 0 $settings->{'BitTorrent::Tracker'} && $settings->{'BitTorrent::Tracker'}{'announce_interval'}
4946 0 0 0 exists $request->{'qs'}{'dlsubsystem'} and exists $request->{'qs'}{'privdata'}
5524 0 0 0 $videoformats->{$fmt}{'lock'} == 1 and LOCK_WRITE($video{'out_filepath'}) != 1
5563 0 0 0 defined $minsize and -s $filename < $minsize
5629 0 0 0 $subm3u and -e $reqsub
5739 0 0 0 $lastelm and defined $lastelm->{'size'}
0 0 0 $lastelm and defined $lastelm->{'size'} and $amount > $lastelm->{'size'}
5757 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'}
6120 0 0 0 $headread and $headread == 4
6129 0 0 0 $dataread and $dataread == $size
6165 0 0 0 $magic and $magic == 4
6429 0 0 0 defined $tt and $tt->{'value'} == 2
6440 0 0 0 defined $tt and $tt->{'value'} == 1
6518 0 0 0 $block and $block->{'trackno'} == $tid
6755 0 0 0 $matroska->{'ebml'}{'elements'}[0]{'id'} == 408125543 and $matroska->{'ebml'}{'elements'}[0]{'size'} == 0

or 2 conditions

line l !l condition
265 0 0 $loop_interval // -1
324 0 0 $loop_interval //= -1
564 0 0 $lockdata //= "99999999999"
695 0 0 $options->{'min_file_size'} //= 0
1119 0 0 $self->{'header'}{'Host'} // ""
1190 0 0 $datalength //= '99999999999'
1257 0 0 $size // "*"
1308 0 0 $self->{'outheaders'}{'Accept-Ranges'} //= "bytes"
1310 0 0 $self->{'outheaders'}{'Connection'} //= "keep-alive"
1329 0 0 $dataitem->{'get_current_length'} //= sub { return undef; }
1465 0 0 $locksz || 0
1469 0 0 &$get_current_size() || 0
1595 0 0 $self->{'header'}{'_RangeStart'} // 0
2444 0 0 $oldenvvars{$key} // "{undef}"
2445 0 0 $env->{$key} // "{undef}"
2462 0 0 $env->{$key} // "{undef}"
2463 0 0 $oldenvvars{$key} // "{undef}"
2700 0 0 $type // "undef"
2725 0 0 &reftype($value) // "SCALAR"
2799 0 0 $ENV{'XDG_CONFIG_DIRS'} || '/etc/xdg'
2826 0 0 $SETTINGS->{'HOST'} ||= "127.0.0.1"
2827 0 0 $SETTINGS->{'PORT'} ||= 8000
2829 0 0 $SETTINGS->{'ALLOWED_REMOTEIP_HOSTS'} ||= [["127.0.0.1"]]
2843 0 0 $2 // 32
2875 0 0 $SETTINGS->{'XSEND'} //= 0
2933 0 0 $SETTINGS->{'TIMEOUT'} ||= 75
3543 0 0 $where //= ""
3742 0 0 $request->{'header'}{'_RangeStart'} || 0
3890 0 0 $request->{'qs'}{'max_sample_rate'} // 192000
4363 0 0 uri_escape($request->{'qs'}{'q'}) // ""
0 0 $request->{'qs'}{'maxResults'} // 25
4381 0 0 $request->{'qs'}{'fmt'} //= "html"
4410 0 0 $qs->{'media'} // "video"
0 0 $self->{'fmts'}{$qs->{'media'} // "video"} // "best"
4483 0 0 $request->{'qs'}{'media'} //= "music"
4489 0 0 $request->{'qs'}{'media'} //= "music"
4592 0 0 $self->{'torrents'}{pack "H*", $asciihash} //= {}
4742 0 0 $ai //= 1800
5080 0 0 $request->{'qs'}{'vfmt'} // "noconv"
5090 0 0 $request->{'qs'}{'fmt'} // "m3u8"
5458 0 0 $qs->{'fmt'} //= "noconv"
6854 0 0 $qs->{'action'} //= "library"
6858 0 0 $qs->{'library'} //= "all"

or 3 conditions

line l !l&&r !l&&!r condition
477 0 0 0 $self->{'resources'}{$filename} //= MHFS::Util::read_file($filename)
810 0 0 0 $combined{$ext} // $combined{'bin'}
1117 0 0 0 not $self->{'header'}{'Host'} or $self->{'header'}{'Host'} ne $self->{'client'}{'serverhostname'}
1185 0 0 0 $self->{'client'}{'absurl'} // (defined $self->{'header'}{'Host'} ? "http://" . $self->{'header'}{'Host'} : undef)
1191 0 0 0 $self->{'header'}{'_RangeEnd'} // $datalength - 1
1309 0 0 0 $self->{'outheaders'}{'Connection'} //= $self->{'header'}{'Connection'}
1533 0 0 0 $mime //= getMIME($filename)
1559 0 0 0 $self->{'header'}{'_RangeEnd'} // $size - 1
1594 0 0 0 not $options->{'code'} or $options->{'code'} == 206
1596 0 0 0 $self->{'header'}{'_RangeEnd'} // $bytesize - 1
1706 0 0 0 not defined $requestfile or rindex($requestfile, $droot, 0) != 0
1747 0 0 0 not defined $requestfile or rindex($requestfile, $ml, 0) != 0
1768 0 0 0 $filename eq "." or $filename eq ".."
1972 0 0 0 $self->{'request'} //= "MHFS::HTTP::Server::Client::Request"->new($self)
2116 0 0 0 $client->{'sendresponsetimerid'} //= $client->AddClientCloseTimer($client->{'server'}{'settings'}{'sendresponsetimeout'}, $client->{'CONN-ID'})
2708 0 0 0 $raw or $noindent
2797 0 0 0 $ENV{'XDG_CONFIG_HOME'} || $ENV{'HOME'} . '/.config'
2807 0 0 0 $CFGDIR ||= $XDG_CONFIG_HOME . "/mhfs"
2868 0 0 0 $SETTINGS->{'APPDIR'} || dist_dir('App-MHFS')
2876 0 0 0 $SETTINGS->{'TMPDIR'} || ($ENV{'XDG_CACHE_HOME'} || $ENV{'HOME'} . '/.cache') . '/mhfs'
2886 0 0 0 $SETTINGS->{'DATADIR'} || ($ENV{'XDG_DATA_HOME'} || $ENV{'HOME'} . '/.local/share') . '/mhfs'
2888 0 0 0 $SETTINGS->{'MHFS_TRACKER_TORRENT_DIR'} ||= $SETTINGS->{'DATADIR'} . "/torrent"
2889 0 0 0 $SETTINGS->{'VIDEO_TMPDIR'} ||= $tmpdir . "/video"
2890 0 0 0 $SETTINGS->{'MUSIC_TMPDIR'} ||= $tmpdir . "/music"
2891 0 0 0 $SETTINGS->{'GENERIC_TMPDIR'} ||= $tmpdir . "/tmp"
2892 0 0 0 $SETTINGS->{'SECRET_TMPDIR'} ||= $tmpdir . "/secret"
2895 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"
2928 0 0 0 $SETTINGS->{'BINDIR'} ||= $APPDIR . "/bin"
2929 0 0 0 $SETTINGS->{'DOCDIR'} ||= $APPDIR . "/doc"
2935 0 0 0 $SETTINGS->{'recvrequestimeout'} ||= $SETTINGS->{'TIMEOUT'}
2937 0 0 0 $SETTINGS->{'sendresponsetimeout'} ||= $SETTINGS->{'TIMEOUT'}
2939 0 0 0 $SETTINGS->{'Torrent'}{'pyroscope'} ||= $ENV{'HOME'} . "/.local/pyroscope"
2968 0 0 0 $type eq "d" or $type eq "l"
3000 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
3016 0 0 0 $firstchar eq "d" or $firstchar eq "l"
3530 0 0 0 $file eq "." or $file eq ".."
3654 0 0 0 $ver < 68 or $request->{'header'}{'User-Agent'} =~ /Linux/
3743 0 0 0 $request->{'header'}{'_RangeEnd'} // $wavsize - 1
3829 0 0 0 defined $request->{'qs'}{'fmt'} || defined $request->{'qs'}{'max_sample_rate'} || defined $request->{'qs'}{'bitdepth'} || defined $request->{'qs'}{'part'}
3891 0 0 0 $request->{'qs'}{'bitdepth'} // ($max_sample_rate > 48000 ? 24 : 16)
3940 0 0 0 $desiredrate //= $max_sample_rate
4122 0 0 0 $last eq ".png" or $last eq ".jpg"
0 0 0 $last eq ".png" or $last eq ".jpg" or $last eq "jpeg"
4689 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
4880 0 0 0 not defined $qs->{'playinbrowser'} or $qs->{'playinbrowser'} == 1
5144 0 0 0 $filename eq "." or $filename eq ".."
5205 0 0 0 $newitem eq "." or $newitem eq ".."
5252 0 0 0 $filename eq "." or $filename eq ".."
5333 0 0 0 $newitem eq "." or $newitem eq ".."
6026 0 0 0 not defined $trackno or length $data < 3
6100 0 0 0 $track->{$id}{'value'} // $track->{$id}{'data'}
6399 0 0 0 $track{'CodecID_Major'} eq "EAC3" or $track{'CodecID_Major'} eq "AC3"
6516 0 0 0 $elm{'id'} == 163 or $elm{'id'} == 160
6806 0 0 0 $video->{'duration'} //= "PT$1H$2M$3.$4S"