File Coverage

blib/lib/IO/All/Temp.pm
Criterion Covered Total %
statement 17 17 100.0
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 23 24 95.8


line stmt bran cond sub pod time code
1 54     54   1845 use strict; use warnings;
  54     54   129  
  54         1704  
  54         327  
  54         128  
  54         2600  
2             package IO::All::Temp;
3              
4 54     54   19998 use IO::All::File -base;
  54         232  
  54         770  
5              
6             sub temp {
7 2     2 1 6 my $self = shift;
8 2         6 bless $self, __PACKAGE__;
9 2 50       523 my $temp_file = IO::File::new_tmpfile()
10             or $self->throw("Can't create temporary file");
11 2         27 $self->io_handle($temp_file);
12 2         13 $self->_error_check;
13 2         46 $self->autoclose(0);
14 2         12 $self->is_open(1);
15 2         8 return $self;
16             }
17              
18             1;