Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Moose and File::Temp

by gsiglet (Acolyte)
on Nov 19, 2012 at 14:26 UTC ( #1004549=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Moose and File::Temp
in thread Moose and File::Temp

So it is impossible to use  while(<$self->{IamAfileHandleAttribute}>) { ... } > to read a file, outside my constructor. I guess I will have to do:

my $temp_fh = $self->{IamAfileHandleAttribute}; while (<$temp_fh>) { ... }


Comment on Re^3: Moose and File::Temp
Select or Download Code
Re^4: Moose and File::Temp
by tinita (Parson) on Nov 19, 2012 at 14:52 UTC
    So it is impossible to use while(<$self->{IamAfileHandleAttribute}>) { ... } > to read a file
    no, it's not really impossible. you can just use readline instead of the diamond operator.
    while (readline $self->{IamAfileHandleAttribute}) {

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004549]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-07-07 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls