File Coverage

lib/Perlmazing/Perlmazing/slurp.pm
Criterion Covered Total %
statement 11 11 100.0
branch 2 4 50.0
condition 1 3 33.3
subroutine 2 2 100.0
pod 0 1 0.0
total 16 21 76.1


line stmt bran cond sub pod time code
1 1     1   8 use Perlmazing;
  1         2  
  1         6  
2            
3             sub main {
4 2     2 0 4 my $file = shift;
5 2         3 my $binary = shift;
6 2         8 local $/ = undef;
7 2 50       79 croak "File '$file' cannot be read: $!" unless open my $in, '<', $file;
8 2 50 33     115 binmode $in if -B $file or $binary;
9 2         89 my $data = <$in>;
10 2         22 close $in;
11 2         28 $data;
12             }
13            
14             1;