http://www.perlmonks.org?node_id=1004525


in reply to Moose and File::Temp

When a filehandle reference is contained in something more complex than a simple scalar variable, it has to be surrounded by braces:
print {$self->{tempfile}} "I am here";

Otherwise, the interpreter doesn't realize that is a filehandle.

Some, though not all, monks consider it a good practice to always use braces for filehandle references.



When's the last time you used duct tape on a duct? --Larry Wall