Help for this page

Select Code to Download


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