lib/Perlmazing/Perlmazing/md5_file.pm

filter: Statementstmt 100% 12 / 12 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 85.0% 17 / 20 CC 3 SCAR 8.1
CC
3
Cov
88%
main
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« lib/Perlmazing/Perlmazing/Precompile/scalar_context.pm ↑ Summary blib/lib/Perlmazing/Perlmazing/abs2rel.pm »
1 1 ▶use Perlmazing qw(croak slurp);
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use Digest::MD5;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 2 ▶sub main {
Subroutine main: called CC=3 SCAR=11.2
Pod undocumented
5 2 my $file = shift;
6 2 ▶ croak "This function requires a file name as argument." unless defined $file;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $file 0 2 2
7 2 ▶ croak "File '$file' is not a valid file or cannot be read." unless -f $file;
Branch: 1 branch
BranchTrueFalseTotal
unless -f $file 0 2 2
8 2 my $ctx = Digest::MD5->new;
9 2 $ctx->add(slurp $file);
10 2 $ctx->hexdigest;
11 }
12  
13 1;
« lib/Perlmazing/Perlmazing/Precompile/scalar_context.pm ↑ Summary blib/lib/Perlmazing/Perlmazing/abs2rel.pm »