<?xml version="1.0" encoding="windows-1252"?>
<node id="1004525" title="Re: Moose and File::Temp" created="2012-11-19 07:41:56" updated="2012-11-19 07:41:56">
<type id="11">
note</type>
<author id="27571">
ColonelPanic</author>
<data>
<field name="doctext">
When a filehandle reference is contained in something more complex than a simple scalar variable, it has to be surrounded by braces:
&lt;code&gt;
print {$self-&gt;{tempfile}} "I am here";
&lt;/code&gt;
&lt;p&gt;Otherwise, the interpreter doesn't realize that is a filehandle.&lt;/p&gt;
&lt;p&gt;Some, &lt;a href="http://perlmonks.org/?node_id=1003569"&gt;though not all&lt;/a&gt;, monks consider it a good practice to always use braces for filehandle references.&lt;/p&gt;


&lt;div class="pmsig"&gt;&lt;div class="pmsig-27571"&gt;
&lt;br&gt;&lt;br&gt;When's the last time you used duct tape on a duct?  --Larry Wall
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1004523</field>
<field name="parent_node">
1004523</field>
</data>
</node>
