in reply to Moose and File::Temp
Are your remarks relevant to the following issue as well?
This also throws an error:package test; use Moose; use FileHandle; has 'fh' => ( is => 'rw', isa => 'FileHandle', lazy => 1, default => sub { FileHandle->new }, ); sub BUILD { my $self = shift; open $self->{fh} , "<", "temp.txt"; while (<$self->{fh}>) { print $_; } }
Syntax error at test.pm line 17, near "<$self->{fh"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Moose and File::Temp
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 |
In Section
Seekers of Perl Wisdom