gsiglet has asked for the wisdom of the Perl Monks concerning the following question:
And the errorpackage 'test.pm' use Moose; use File::Temp; has 'tempfile' => ( is => 'rw', isa => 'File::Temp' ); sub BUILD { my $self = shift; my $args = shift; $self->{tempfile} = File::Temp->new(UNLINK => 1, SUFFIX => '.tmp'); print $self->{tempfile} "I am here"; }
If you writeString found where operator expected at test.pm line 16, near "} "I am + here"" (Missing operator before "I am here"?)
then it is working. Anybody has any idea? Thanks a lot$self->{tempfile} = File::Temp->new(UNLINK => 1, SUFFIX => '.tmp'); my $tmp = $self->{tempfile}; print $tmp "I am here";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moose and File::Temp
by ColonelPanic (Friar) on Nov 19, 2012 at 12:41 UTC | |
|
Re: Moose and File::Temp
by tobyink (Canon) on Nov 19, 2012 at 13:19 UTC | |
|
Re: Moose and File::Temp
by 2teez (Vicar) on Nov 19, 2012 at 13:03 UTC | |
|
Re: Moose and File::Temp
by gsiglet (Acolyte) on Nov 19, 2012 at 13:53 UTC | |
by tobyink (Canon) on Nov 19, 2012 at 14:05 UTC | |
by gsiglet (Acolyte) on Nov 19, 2012 at 14:26 UTC | |
by tinita (Parson) on Nov 19, 2012 at 14:52 UTC | |
|
Re: Moose and File::Temp
by gsiglet (Acolyte) on Nov 19, 2012 at 13:14 UTC |