<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Prepan on Hashbang.ca</title>
		<link>https://hashbang.ca/tag/prepan</link>
		<description>Recent content in Prepan on Hashbang.ca</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sat, 26 May 2012 00:39:00 -0400</lastBuildDate>
		
			<atom:link href="https://hashbang.ca/tag/prepan/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Introducing File::Symlink::Atomic</title>
				<link>https://hashbang.ca/post/introducing-filesymlinkatomic</link>
				<pubDate>Sat, 26 May 2012 00:39:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/introducing-filesymlinkatomic/</guid>
				<description>&lt;p&gt;In &lt;a href=&#34;https://hashbang.ca/post/tips-tricks-from-my-4-months-at-pythian&#34;&gt;Tips &amp;amp; tricks from my 4 months at Pythian&lt;/a&gt;, I showed how to give a symlink a new target atomically. I wasn&amp;rsquo;t aware of any module to encapsulate that, so I quickly put together &lt;code&gt;File::Symlink::Atomic&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This module is useful because it eliminates the need to know how to do this safely - simply &lt;code&gt;use File::Symlink::Atomic&lt;/code&gt; and you get a drop-in replacement for &lt;code&gt;CORE::symlink&lt;/code&gt;. It creates a temporary symlink (using &lt;code&gt;File::Temp&lt;/code&gt; to get a unique pathname) pointing to your new target, then moves it into place with a &lt;code&gt;rename&lt;/code&gt; call. On POSIX systems, the rename system call &lt;a href=&#34;http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html&#34;&gt;guarantees atomicity&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
