blib/lib/Liveman.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 12 | 59 | 20.3 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
16 | 5 | 0 | 1 | $self->{'files'} and not scalar @{$self->{'files'};} |
96 | 0 | 2 | 4 | exists $+{'sub'} and "_" ne substr($+{'sub'}, 0, 1) |
97 | 6 | 0 | 0 | exists $+{'has'} and "_" ne substr($+{'has'}, 0, 1) |
153 | 0 | 0 | 0 | -r 'minil.toml' && read_text('minil.toml') =~ /^\s*license\s*=\s*"([^"\n]*)"/mu |
234 | 0 | 1 | 0 | -e $test and $mdmtime > (stat $test)[9] |
238 | 2 | 0 | 0 | -f "minil.toml" and -r "minil.toml" |
245 | 0 | 0 | 0 | -f $name and -r $name |
246 | 0 | 0 | 0 | -e "README.md" and (stat $name)[9] > (stat "README.md")[9] |
line | l | !l | condition |
---|---|---|---|
75 | 0 | 0 | $self->{'files'} // [split(/\n/u, `find lib -name '*.pm' -a -type f`, 0)] |
108 | 2 | 0 | s[^\#[\ \t]+( (?<is>METHODS|SUBROUTINES) | DESCRIPTION ) 2: (^```.*?^```|.)*? (?= ^\#\s) 3: ][my $x = $&; 4: my $is = $+{'is'}; 5: if ($is) { 6: while ($x =~ /^\#\#[\ \t]+(\w+)/gmu) { 7: delete $sub{$1}; 8: }; 9: }; 10: $added += keys %sub; 11: join "", $x, $is ? () : "# SUBROUTINES/METHODS\n\n", map({&_md_method($pkg, $_, $sub{$_}{'args'}, $sub{$_}{'remark'});} sort(keys %sub));]emsux or die "\x{41d}\x{435}\x{442} \x{441}\x{435}\x{43a}\x{446}\x{438}\x{438} DESCRIPTION!" |
121 | 0 | 0 | s[^\#[\ \t]+((?<is>FEATURES) | DESCRIPTION) 2: (^```.*?^```|.)*? (?= ^\#\s) 3: ][my $x = $&; 4: my $is = $+{'is'}; 5: if ($is) { 6: while ($x =~ /^\#\#[\ \t]+([^\n]+?)[\ \t]*/gmu) { 7: delete $has{$1}; 8: }; 9: }; 10: $added += keys %has; 11: join "", $x, $is ? () : "# FEATURES\n\n", map({&_md_feature($pkg, $_, $sub{$_}{'remark'});} sort(keys %has));]emsux or die "\x{41d}\x{435}\x{442} \x{441}\x{435}\x{43a}\x{446}\x{438}\x{438} DESCRIPTION!" |
223 | 0 | 2 | $self->{'files'} // [split(/\n/u, `find lib -name '*.md'`, 0)] |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
100 | 2 | 0 | 0 | keys %sub or keys %has |
150 | 0 | 0 | 0 | +(shift())->{'_git_user_name'} //= _trim(`git config user.name`) |
151 | 0 | 0 | 0 | +(shift())->{'_git_user_email'} //= _trim(`git config user.email`) |
152 | 0 | 0 | 0 | +(shift())->{'_year'} //= _trim(`date +%Y`) |
153 | 0 | 0 | 0 | +(shift())->{'_license'} //= -r 'minil.toml' && read_text('minil.toml') =~ /^\s*license\s*=\s*"([^"\n]*)"/mu ? $1 eq "perl_5" ? "Perl5" : uc($1) =~ s/_/v/ru : "Perl5" |
154 | 0 | 0 | 0 | +(shift())->{'_land'} //= `curl "https://ipapi.co/\$(curl https://2ip.ru --connect-timeout 3 --max-time 3 -Ss)/json/" --connect-timeout 3 --max-time 3 -Ss` =~ /country_name": "([^"\n]*)"/u ? $1 eq "Russia" ? "Rusland" : $1 : "Rusland" |
234 | 0 | 0 | 1 | not -e $test or -e $test and $mdmtime > (stat $test)[9] |
246 | 0 | 0 | 0 | not -e "README.md" or -e "README.md" and (stat $name)[9] > (stat "README.md")[9] |
312 | 0 | 2 | 0 | $test //= $self->test_path($md) |