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   1539 use strict; use warnings;
  54     54   82  
  54         2529  
  54         260  
  54         78  
  54         2731  
2             package IO::All::Temp;
3              
4 54     54   23492 use IO::All::File -base;
  54         156  
  54         720  
5              
6             sub temp {
7 2     2 1 3 my $self = shift;
8 2         3 bless $self, __PACKAGE__;
9 2 50       372 my $temp_file = IO::File::new_tmpfile()
10             or $self->throw("Can't create temporary file");
11 2         17 $self->io_handle($temp_file);
12 2         10 $self->_error_check;
13 2         20 $self->autoclose(0);
14 2         11 $self->is_open(1);
15 2         4 return $self;
16             }
17              
18             1;