File Coverage

blib/lib/Parallel/Tiny/Test.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 20 22 90.9


line stmt bran cond sub pod time code
1             package Parallel::Tiny::Test;
2 11     11   3795 use strict;
  11         11  
  11         231  
3 11     11   22 use warnings;
  11         55  
  11         231  
4 11     11   33 use File::Temp qw(tempfile);
  11         0  
  11         1089  
5              
6             sub new {
7 21     21 0 20298 my ($fh, $filename) = tempfile();
8 21         13271 return bless({ tempfile => $fh, filename => $filename }, shift) }
9              
10             sub run {
11 10     10 0 107 my $self = shift;
12 10         52 my $file = $self->{tempfile};
13 10         237 print $file 1;
14 10         462 close($file);
15             }
16              
17             1;
18