<?xml version="1.0" encoding="windows-1252"?>
<node id="471463" title="Re^3: Writing to a file atomically without renaming" created="2005-06-30 16:28:55" updated="2005-08-13 12:57:02">
<type id="11">
note</type>
<author id="185225">
waswas-fng</author>
<data>
<field name="doctext">
Modify [cpan://IO::AtomicFile]'s source -- &lt;code&gt;

Change:
### Open the file!  Returns filehandle on success, for use as a constructor: 
    $self-&gt;SUPER::open($temp, $mode) ? $self : undef;



To:

### Open the file!  Returns filehandle on success, for use as a constructor: 
$self-&gt;SUPER::open($temp, $mode) ? $self : undef;
chown $uid, $gid, $temp;

&lt;/code&gt;

Where uid,and gid are static for this app or dynamically built somehow or passed to your version of IO::AtomicFile...
chown $uid, $gid, "tempfile&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-185225"&gt;
&lt;br&gt;&lt;br&gt;-Waswas
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
471413</field>
<field name="parent_node">
471449</field>
</data>
</node>
