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   3498 use strict;
  11         55  
  11         242  
3 11     11   33 use warnings;
  11         11  
  11         220  
4 11     11   33 use File::Temp qw(tempfile);
  11         11  
  11         1122  
5              
6             sub new {
7 21     21 0 17487 my ($fh, $filename) = tempfile();
8 21         10643 return bless({ tempfile => $fh, filename => $filename }, shift) }
9              
10             sub run {
11 10     10 0 64 my $self = shift;
12 10         62 my $file = $self->{tempfile};
13 10         377 print $file 1;
14 10         506 close($file);
15             }
16              
17             1;
18