1use strict; use warnings; 2package IO::All::Temp; 3 4use IO::All::File -base; 5 6sub temp { 7 my $self = shift; 8 bless $self, __PACKAGE__; 9 my $temp_file = IO::File::new_tmpfile() 10 or $self->throw("Can't create temporary file"); 11 $self->io_handle($temp_file); 12 $self->_error_check; 13 $self->autoclose(0); 14 $self->is_open(1); 15 return $self; 16} 17 181; 19