- or download this
$self->{tempfile} = File::Temp->new(UNLINK => 1, SUFFIX => '.tmp');
print $self->{tempfile} "I am here";
- or download this
$self->tempfile( File::Temp->new(UNLINK => 1, SUFFIX => '.tmp') );
print {$self->tempfile} "I am here";
- or download this
package test; # not 'test.pm'
use Moose;
...
my $self = shift;
print { $self->tempfile } "I am here";
}