<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>transfixed but not dead!</title>
	<atom:link href="http://transfixedbutnotdead.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://transfixedbutnotdead.com</link>
	<description>my ramblings on life, work &#38; anything left in-between</description>
	<lastBuildDate>Thu, 11 Mar 2010 20:03:02 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='transfixedbutnotdead.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/0a317653027efb1ab2bf8adde3dcb067?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>transfixed but not dead!</title>
		<link>http://transfixedbutnotdead.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://transfixedbutnotdead.com/osd.xml" title="transfixed but not dead!" />
	<atom:link rel='hub' href='http://transfixedbutnotdead.com/?pushpress=hub'/>
		<item>
		<title>Regex brain fart!</title>
		<link>http://transfixedbutnotdead.com/2010/03/11/regex-brain-fart/</link>
		<comments>http://transfixedbutnotdead.com/2010/03/11/regex-brain-fart/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 20:03:02 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=888</guid>
		<description><![CDATA[Yesterday I got stuck for far too long on a simple regex not doing what I expected it to do.  Here is an example:

sub prefix {
    return $1 if $_[0] =~ m/^(\w+)_/;
    return 'unknown';
}

say prefix( 'radio_some_very_long_var_name' );
say prefix( 'comment_blahblah'          [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=888&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Yesterday I got stuck for far too long on a simple</em> regex not doing what I expected it to do.  Here is an example:</p>
<pre class="brush: perl;">
sub prefix {
    return $1 if $_[0] =~ m/^(\w+)_/;
    return 'unknown';
}

say prefix( 'radio_some_very_long_var_name' );
say prefix( 'comment_blahblah'              );
</pre>
<p>I was &#8220;hoping&#8221; to see <em>radio</em> and <em>comment</em> but got back an incorrect <em>radio_some_very_long_var</em> on first item (and unfortunately I hadn&#8217;t noticed the <em>_name</em> had been dropped.  That may have saved a lot of the heartache!).</p>
<p>I looked long and hard at the regex thinking&#8230;</p>
<blockquote><p>what is wrong with \w+ ?</p></blockquote>
<p>Of course what was wrong was me  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />      </p>
<p>\w regex includes matching the _ (underscore)  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>From <a href="http://perldoc.perl.org/perlre.html">perlre pod</a></p>
<blockquote><p>\w  &#8211;  Match a &#8220;word&#8221; character (alphanumeric plus &#8220;_&#8221;)</p></blockquote>
<p>I don&#8217;t think I&#8217;ve ever needed the pleasure of knowing that&#8230; but I do now!  Here&#8217;s the correct regex i needed:</p>
<pre class="brush: perl;">
m/^([A-Za-z]+)_/
</pre>
<p>Doh!</p>
<p>/I3az/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/888/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/888/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/888/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=888&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/03/11/regex-brain-fart/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Been reddited</title>
		<link>http://transfixedbutnotdead.com/2010/03/04/been-reddited/</link>
		<comments>http://transfixedbutnotdead.com/2010/03/04/been-reddited/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 18:58:08 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[reddit]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=873</guid>
		<description><![CDATA[Been very busy with work lately so it nearly slipped completely past me that I had a large spike in traffic to this blog last week with over 1200+ unique hits on one day.
The culprit: Reddit (Programming).  My post Anyone for Perl 6 metaprogramming? had been posted there .
My first blog entry to make [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=873&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Been very busy with work lately so it nearly slipped completely past me that I had a large spike in traffic to this blog last week with over 1200+ unique hits on one day.</p>
<p>The culprit: <a href="http://www.reddit.com/r/programming/">Reddit (Programming)</a>.  My post <a href="http://transfixedbutnotdead.com/2010/01/14/anyone-for-perl-6-metaprogramming/">Anyone for Perl 6 metaprogramming?</a> had been <a href="http://www.reddit.com/r/programming/comments/b692l/anyone_for_perl_6_metaprogramming/">posted there </a>.</p>
<p>My first blog entry to make reddit  *blush*</p>
<p>Glad it created enough stir, comments &amp; even points (29 in total&#8230;  59 up &amp; 30 down!).  Unfortunately some of the commenters didn&#8217;t follow link on my page to previous post and so didn&#8217;t understand the full context (only 17 of the 1200+ reddit surge actually did click the said link).</p>
<p>Apart from quick scans to see if anything interesting is on <a href="http://www.reddit.com/r/perl/">Perl Reddit</a>, I don&#8217;t go to Reddit anymore.  I much prefer <a href="http://news.ycombinator.com/">Hacker News</a>.   In fact its been so long that I couldn&#8217;t remember what my password was so I gave up even trying to leave a comment on the Reddit post <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>/I3az/</p>
<p>Update:  Gosh I also nearly missed that it <a href="http://news.ycombinator.com/item?id=1151932">had been posted</a> to <a href="http://news.ycombinator.com/item?id=1151932">Hacker News</a> only few days later as well!</p>
<p>Update 2: Things go from <a href="http://www.reddit.com/r/programming/shirt/b692l/anyone_for_perl_6_metaprogramming/">weird to bizarre</a>.  You can now buy a T-shirt with my post title <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/873/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/873/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/873/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/873/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/873/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/873/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/873/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/873/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/873/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/873/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=873&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/03/04/been-reddited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>First reported bug for one of my CPAN modules</title>
		<link>http://transfixedbutnotdead.com/2010/02/21/first-reported-bug-for-one-of-my-cpan-modules/</link>
		<comments>http://transfixedbutnotdead.com/2010/02/21/first-reported-bug-for-one-of-my-cpan-modules/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 18:41:38 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[CPAN]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=854</guid>
		<description><![CDATA[It should invoke some trepidation when seeing the first ever reported bug hitting your inbox.   However it was the complete opposite because I got a nice warm feeling about the fact that something I&#8217;ve written is being used in the wild.
Still the bug(s) needs fixing and its understandable that prolific CPAN / opensource [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=854&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>It should invoke some trepidation when seeing the first ever reported bug hitting your inbox.   However it was the complete opposite because I got a nice warm feeling about the fact that something I&#8217;ve written is being used in the wild.</p>
<p>Still the bug(s) needs fixing and its understandable that prolific CPAN / opensource authors may get bogged down having to find time to fix bugs in heavily used projects.</p>
<p>Fortunate for me I only have a <a href="http://search.cpan.org/~draegtun/">few CPAN modules</a> at this time and I doubt they&#8217;re heavily used! Even more lucky that in this case  the bug was only related to <a href="https://rt.cpan.org/Ticket/Display.html?id=54531">testing on Windows</a>.</p>
<p>So if you&#8217;ve written software then you have bugs!  Thus you need a good <a href="http://en.wikipedia.org/wiki/Issue_tracking_system">issue tracking system</a> to keep a handle on things. Luckily <a href="http://cpan.org">CPAN</a> comes with its own  <a href="http://en.wikipedia.org/wiki/Request_Tracker">Request Tracker (RT)</a> from <a href="http://bestpractical.com/rt">Best Practical</a>.   My first reported bug came <a href="https://rt.cpan.org/Dist/ByMaintainer.html?Name=DRAEGTUN">via this</a> last week.</p>
<p>You can change your CPAN module page to <a href="http://babyl.dyndns.org/techblog/2010/02/contributing-to-cpan-pause-id-bug-tracking-and-code-repositories.html">point to any other issue tracker</a> should you wish this (see part about amending your meta tag and also <a href="http://transfixedbutnotdead.com/2009/05/01/repository-link-now-appearing-on-cpan/">my old post</a> on repo link).    But I&#8217;m more than happy to go with RT and there maybe good reasons for doing this because it maybe better integrated into the CPAN toolchain (my PAUSE login worked with RT).</p>
<p>BTW, my <em>testing with Windows</em> issue is the usual pathname and EOL delimiter differences.  Just because it leaves your <em>box</em> with 100% passes it would be silly to expect it arrives at <a href="http://twitter.com/mathie/status/4704215986">someone else&#8217;s <em>box</em> the same</a> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>/I3az/</p>
<p>PS. Related references:</p>
<ul>
<li><a href="http://transfixedbutnotdead.com/2009/01/23/cpan-smoke-testing-an-unsung-hero/">CPAN Smoke Testing: An unsung hero</a>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/854/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/854/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/854/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=854&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/02/21/first-reported-bug-for-one-of-my-cpan-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Nearly famous on Github!</title>
		<link>http://transfixedbutnotdead.com/2010/02/13/nearly-famous-on-github/</link>
		<comments>http://transfixedbutnotdead.com/2010/02/13/nearly-famous-on-github/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 21:39:26 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=844</guid>
		<description><![CDATA[After reading about Tatsuhiko Miyagawa well deserved accolade for being famous on github, I thought I better check my own vanity score  
I was a little shocked to see i am listed in San Francisco list?   Though no surprises to see I&#8217;m in the bottom bunch with score of 0.0 on that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=844&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>After reading about <a href="http://bulknews.typepad.com/blog/">Tatsuhiko Miyagawa</a> well deserved accolade for being <a href="http://bulknews.typepad.com/blog/2010/02/famous-on-github.html">famous on github</a>, I thought I better check my own vanity score <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I was a little shocked to see i am listed in San Francisco list?   Though no surprises to see I&#8217;m in the bottom bunch with score of 0.0 on that list!</p>
<p>But i am relieved to see i do appear in the London list and indeed pretty chuffed to see i reached a  respectable position of 155 with a github &#8220;social score&#8221; of 688.949686387002</p>
<p>Well done to <a href="http://github.com/miyagawa">Miyagawa</a> and all those other Perl mongers who continue keep the <a href="http://github.com/languages/Perl">Perl flag flying high on Github</a>.</p>
<p>/I3az/</p>
<p>refs: </p>
<ul>
<li><a href="http://www.hackdiary.com/2010/02/10/algorithmic-recruitment-with-github/">Algorithmic recruitment with GitHub</a>
<li><a href="http://news.ycombinator.com/item?id=1115109">Algorithmic recruitment with GitHub (Hacker News)<a>
<li><a href="http://github.com/search">Github search (interesting online tool for advance github searching)</a>
</li>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/844/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=844&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/02/13/nearly-famous-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Perl and Mac OS X versions</title>
		<link>http://transfixedbutnotdead.com/2010/02/03/perl-and-mac-os-x-versions/</link>
		<comments>http://transfixedbutnotdead.com/2010/02/03/perl-and-mac-os-x-versions/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 10:42:05 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=836</guid>
		<description><![CDATA[Apple website has an opensource page: http://www.opensource.apple.com/, which lists all its products and components which have and use opensource technology.
If you go here: http://www.apple.com/opensource/, it provides a complete list of opensource projects that Apple uses.  
In this list is of course Perl.  From this we can see which version of Perl was compiled [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=836&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Apple website has an opensource page: <a href="http://www.opensource.apple.com/">http://www.opensource.apple.com/</a>, which lists all its products and components which have and use opensource technology.</p>
<p>If you go here: <a href="http://www.apple.com/opensource/">http://www.apple.com/opensource/</a>, it provides a complete list of opensource projects that Apple uses.  </p>
<p>In this list is of course <a href="http://www.opensource.apple.com/source/perl/">Perl</a>.  From this we can see which version of Perl was compiled on Mac OS X.  We can also see what options, patches, fixes &amp; extra modules were included.</p>
<p>So I&#8217;ve been able to glean these Perl versions that Apple have used with Mac OS X:</p>
<ul>
<li>5.10.0 &amp; 5.8.9		(perl-63)</li>
<li>5.8.8				(perl-51 patches: perl-51.1.1, perl-51.1.4)</li>
<li>5.8.6				(perl-38 patch: perl-38.1)	</li>
<li>5.8.6	(perl-35 patch: perl-35.1.1)</li>
<li>5.8.4	(perl-28.2)</li>
<li>5.8.1-RC3	(perl-25.2)</li>
<li>5.8.1	(perl-24.1)	&#8220;Maintenance release working toward v5.8.1&#8243;</li>
<li>5.6.0	(perl-21)</li>
<li>5.6.0	(perl-17)</li>
</ul>
<p>Now which one(s) are tied to which Mac OS X is still in the air a bit!  This is my best stab at it:</p>
<pre>
  10.6    5.10.0 &amp; 5.8.9      perl-63
  10.5    5.8.8               perl-51
  10.4    5.8.6               perl-38 or perl-35
  10.3    5.8.4 or 5.8.1 ?
  10.2    5.8.1 ?
  10.1    5.6.0               ? perl-21 and/or perl-17
  10.0    5.6.0 ?
</pre>
<p>Hopefully this information is <a href="http://stackoverflow.com/questions/2092944/how-can-i-find-out-which-perl-version-was-available-on-older-mac-os-x-versions">useful to someone</a></p>
<p>/I3az/</p>
<p>refs: </p>
<ul>
<li><a href="http://transfixedbutnotdead.com/2010/01/24/mac-os-x-snow-leopard-10-6-and-perl/">Mac OS X “Snow Leopard” (10.6) and Perl</a></li>
<li><a href="http://news.ycombinator.com/item?id=1095075">Apple Open Source (Hacker News)</a>
<li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/836/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/836/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/836/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/836/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/836/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/836/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/836/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/836/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/836/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/836/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=836&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/02/03/perl-and-mac-os-x-versions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Mac OS X &#8220;Snow Leopard&#8221; (10.6) and Perl</title>
		<link>http://transfixedbutnotdead.com/2010/01/24/mac-os-x-snow-leopard-10-6-and-perl/</link>
		<comments>http://transfixedbutnotdead.com/2010/01/24/mac-os-x-snow-leopard-10-6-and-perl/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 16:38:27 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[perl 5.10]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=831</guid>
		<description><![CDATA[Snow Leopard ships with multiple versions of Perl:

5.10.0 (64 bit)
5.10.0 (32 bit)
5.8.9  (32 bit)

The default Perl is 5.10.0 (64 bit).   However you can change this to 32-bit Perl by setting the following ENV shell variable:
export VERSIONER_PERL_PREFER_32_BIT=yes
And to switch to 5.8.9 all you need is this ENV variable set:
export VERSIONER_PERL_VERSION=5.8.9
Instead of setting these [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=831&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Snow Leopard ships with multiple versions of Perl:</p>
<ul>
<li>5.10.0 (64 bit)
<li>5.10.0 (32 bit)
<li>5.8.9  (32 bit)
</ul>
<p>The default Perl is 5.10.0 (64 bit).   However you can change this to 32-bit Perl by setting the following ENV shell variable:</p>
<p><code>export VERSIONER_PERL_PREFER_32_BIT=yes</code></p>
<p>And to switch to 5.8.9 all you need is this ENV variable set:</p>
<p><code>export VERSIONER_PERL_VERSION=5.8.9</code></p>
<p>Instead of setting these ENV variables in your Terminal sessions you can also make the change to the systems defaults:</p>
<ul>
<li>defaults write com.apple.versioner.perl Prefer-32-Bit -bool yes
<li>defaults write com.apple.versioner.perl Version 5.8.9
</ul>
<p>This is a interesting move by Apple and something which may come in very handy in the future.</p>
<p>As it stands at this moment though you probably want 5.10.1 (and beyond) because of issues with 5.10.0.  So you will probably be looking down the compiling route anyway.  Still it does give the future option of a <a href="http://search.cpan.org/dist/local-lib/">local::lib</a> possibility with the pre-installed Perl provided by Apple.</p>
<p><em>NB. I always recommend that you avoid installing modules with CPAN (shell) on OS provided Perl.  Always stick to the OS provided package installer to update Perl &amp; modules (which unfortunately for Mac&#8217;s means &#8220;zilch&#8221; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   Apple &#8220;Software Updater&#8221; may update Perl itself but no extra modules are provided above what Apple provides on top of core Perl)</em></p>
<p>/I3az/</p>
<p>References:</p>
<ul>
<li><a href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/perlmacosx5.10.0.1.html">README.macosx &#8211; Perl under Mac OS X</a>
<li><a href="http://use.perl.org/~pudge/journal/39596">Mac-Carbon Modules and Mac OS X 10.6</a>
<li><a href="http://daringfireball.net/2009/09/snow_leopard_applescript_perl_safari_webkit">Snow Leopard Compatibility Tweaks for That Thing I Wrote in January About Writing AppleScripts That Dynamically Target Either Safari or WebKit</a>
<li><a href="http://stackoverflow.com/questions/2092944/how-can-i-find-out-which-perl-version-was-available-on-older-mac-os-x-versions/2093325#2093325">How can I find out which Perl version was available on older Mac OS X versions?</a>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/831/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/831/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/831/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/831/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/831/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/831/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/831/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/831/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/831/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/831/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=831&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/01/24/mac-os-x-snow-leopard-10-6-and-perl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Anyone for Perl 6 metaprogramming?</title>
		<link>http://transfixedbutnotdead.com/2010/01/14/anyone-for-perl-6-metaprogramming/</link>
		<comments>http://transfixedbutnotdead.com/2010/01/14/anyone-for-perl-6-metaprogramming/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 22:11:36 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[metaprogramming]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[perl6]]></category>
		<category><![CDATA[rakudo]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=823</guid>
		<description><![CDATA[My last post about the Metaprogramming: Ruby vs. Javascript blog post stirred a little thought in my head:
How would it look in Perl 6?
Well here goes, the complete example written in Perl 6 which runs on Rakudo, an implementation of the Perl 6 spec on the Parrot VM:

use v6;

class Ninja {
    has [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=823&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://transfixedbutnotdead.com/2010/01/13/anyone_for_metaprogramming/">last post</a> about the <a href="http://fingernailsinoatmeal.com/post/292301859/metaprogramming-ruby-vs-javascript">Metaprogramming: Ruby vs. Javascript</a> blog post stirred a little thought in my head:</p>
<blockquote><p>How would it look in Perl 6?</p></blockquote>
<p>Well here goes, the complete example written in <a href="http://en.wikipedia.org/wiki/Perl_6">Perl 6</a> which runs on <a href="http://www.rakudo.org/">Rakudo</a>, an implementation of the Perl 6 spec on the <a href="http://en.wikipedia.org/wiki/Parrot_virtual_machine">Parrot VM</a>:</p>
<pre class="brush: perl;">
use v6;

class Ninja {
    has Str $.name is rw;
}

my Ninja $drew .= new( name =&gt; 'Drew' );
my Ninja $adam .= new( name =&gt; 'Adam' );

###########################################################
# Reopen Ninja class (&quot;is also&quot; does the biz)
# and add 'battle_cry' method

class Ninja is also {
    method battle_cry {
        say $.name ~ ' says zing!!!';
    }
}

$drew.battle_cry;   # =&gt; Drew says zing!!!
$adam.battle_cry;   # =&gt; Adam says zing!!!

###########################################################
# add 'throw_star' method to $drew object by creating
# and applying (&quot;does&quot;) role to it (Singleton method)

role ThrowStar {
    method throw_star { say &quot;throwing star&quot; }
}

$drew does ThrowStar;
$drew.throw_star;     # =&gt; throwing a star

###########################################################
# call method dynamically: $obj.'method_name' or $obj.$method

$drew.'battle_cry';     # =&gt; Drew says zing!!!

###########################################################
# add &quot;colour&quot; method closing over $colour_name (ie. closure):

my $colour_name = 'black';

class Ninja is also {
    method colour { say &quot;{$.name}'s colour is {$colour_name} &quot; }
}

$drew.colour;    # =&gt; Drew's colour is black
$adam.colour;    # =&gt; Adam's colour is black

###########################################################

# &quot;defining a method dynamically on an instance that closes
# over local scope and accesses the instance’s state&quot;

my $sword_symbol = '********';

$drew.^add_method( 'swing', method ( Str $sound_effect ) {
    say &quot;{$.name}: {$sword_symbol} {$sound_effect}&quot;;
});

$drew.swing( 'slash!!' );    # =&gt; Drew: ********* slash!!
</pre>
<p>Of all the examples (in Perl 5 / Moose, Ruby, Javascript &amp; <a href="http://codeblog.dhananjaynene.com/2010/01/dynamically-adding-methods-with-metaprogramming-ruby-and-python/">Python</a>) I think this one is the most clean and intuitive.  Perl 6 has a good future if it keeps this up!</p>
<p>And it all went surprising smoothly.  There were a couple of bumps in my Perl 6 road but these are all connected to the flux between the Perl 6 spec, Rakudo and knowing what info you find on the web is still accurate (or not). </p>
<p>First bump was how to re-open a class.  Most Perl 6 documentation implied that classes were always open (unless <code>is final</code> was used).  This no longer seemed to be the case and it gave examples of <code>class A is augmented { ... }</code>.  However this didn&#8217;t work in Rakudo but eventually I came across <code>is also</code> which did.</p>
<p>I like the look of <code>class A is also { ... }</code>.  However <a href="http://perlgeek.de/en/">Moritz</a> on IRC #perl6 mentioned that the Perl 6 spec had changed so my example would need to be:</p>
<pre class="brush: perl;">
augment class Ninja {
    method battle_cry {
        say $.name ~ ' says zing!!!';
    }
}
</pre>
<p>Rakudo is currently a bit behind Perl 6 spec here but above will replace <code>is also</code> shortly.  The change to <em>augment</em> makes sense because it avoids any confusion with roles in the class declaration.</p>
<p>The second bump was how to create a method dynamically.  Now being familiar with Moose I had expected the following to work:</p>
<pre class="brush: perl;">
Ninja.meta.add_method( 'swing', method ( Str $sound_effect ) {
    say &quot;{$.name}: {$sword_symbol} {$sound_effect}&quot;;
});
</pre>
<p>And according to most Perl 6 docs <code>.meta</code> was the method to access the metaclass (MOP).  However <em>meta</em> produced a method not defined error <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Trawling the web further I did find that you could do:</p>
<pre class="brush: perl;">
Ninja.swing = method { say &quot;Changed to zing&quot; };
</pre>
<p>But this only allowed you to redefine a method, not create a new one.</p>
<p>Luckily IRC #perl6 came to the rescue again!  <a href="http://github.com/jnthn">jnthn</a> &amp; Moritz pointed me to <code>$object.^add_method( ... )</code> and the <a href="http://github.com/rakudo/rakudo/blob/ng/docs/metamodel.pod#">docs on the ng branch</a> of <a href="http://github.com/rakudo/rakudo">Rakudo</a> on Github.</p>
<p>Perl6 does have some beautiful syntax.  I love the <code>$drew does Throwstar</code> line.  Soon Rakudo will be able to do:</p>
<pre class="brush: perl;">
$drew does role {
    method throw_star { say &quot;throwing star&quot; }
};
</pre>
<p>So this, <em>augment</em> and probably lots more will be part of the <a href="http://github.com/rakudo/rakudo/tree/ng">ng branch</a> which will be merged with the Rakudo master in the not too distant future.</p>
<p>/I3az/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/823/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/823/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/823/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=823&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/01/14/anyone-for-perl-6-metaprogramming/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Anyone for metaprogramming?</title>
		<link>http://transfixedbutnotdead.com/2010/01/13/anyone_for_metaprogramming/</link>
		<comments>http://transfixedbutnotdead.com/2010/01/13/anyone_for_metaprogramming/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 14:41:43 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[metaprogramming]]></category>
		<category><![CDATA[moose]]></category>
		<category><![CDATA[MooseX::Declare]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[singleton methods]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=813</guid>
		<description><![CDATA[What is metaprogramming? Well this question caused a heated discussion on Hacker News yesterday.
I personally would describe that metaprogramming provides the ability to:
transform programs with programs
and leave it at that!
The article that stirred the metaprogramming pot was Metaprogramming: Ruby vs. Javascript. This actually is a good post and it helped fill in a few holes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=813&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>What is metaprogramming? Well this question caused a <a href="http://news.ycombinator.com/item?id=1047616">heated discussion</a> on <a href="http://news.ycombinator.com/news">Hacker News</a> yesterday.</p>
<p>I personally would describe that <a href="http://en.wikipedia.org/wiki/Metaprogramming">metaprogramming</a> provides the ability to:</p>
<blockquote><p>transform programs with programs</p></blockquote>
<p>and leave it at that!</p>
<p>The article that stirred the metaprogramming pot was <a href="http://fingernailsinoatmeal.com/post/292301859/metaprogramming-ruby-vs-javascript">Metaprogramming: Ruby vs. Javascript</a>. This actually is a good post and it helped fill in a few holes in my &#8220;fragile&#8221; Javascript knowledge.</p>
<p>Luckily I believe my Perl is a bit less fragile!, so I thought I would convert the metaprogramming examples into Perl &amp; <a href="http://moose.perl.org">Moose</a>.</p>
<p>So following the blogs examples, below defines the Ninja class in Moose. <a href="http://search.cpan.org/dist/MooseX-SingletonMethod/">MooseX::SingletonMethod</a> loads Moose with a bit of <a href="http://transfixedbutnotdead.com/2009/07/15/moosexsingletonmethod-now-on-cpan/">singleton method sugar</a>.</p>
<pre class="brush: perl;">
use Modern::Perl;

{
    package Ninja;
    use MooseX::SingletonMethod;
    use namespace::clean -except =&gt; 'meta';

    has name =&gt; ( is =&gt; 'rw', isa =&gt; 'Str' );
}

my $drew = Ninja-&gt;new( name =&gt; 'Drew' );
my $adam = Ninja-&gt;new( name =&gt; 'Adam' );
</pre>
<p><em>NB. namespace::clean stops the Moose sugar percolating into Ninja class (except meta&#8230; which is the Meta Object Protocol method&#8230; which handy for metaprogramming!).</em></p>
<p>Now we re-open the Ninja class and add <code>battle_cry</code> method like so:</p>
<pre class="brush: perl;">
{
    package Ninja;

    sub battle_cry {
        my $self = shift;
        say $self-&gt;name . ' says zing!!!';
    }
}

$drew-&gt;battle_cry;   # =&gt; Drew says zing!!!
$adam-&gt;battle_cry;   # =&gt; Adam says zing!!!
</pre>
<p>Now using MooseX::SingletonMethod we add <code>throw_star</code> singleton method into $drew object:</p>
<pre class="brush: perl;">
$drew-&gt;add_singleton_method( throw_star =&gt; sub {
    say &quot;throwing star&quot;;
});

$drew-&gt;throw_star;   # =&gt; throwing a star
</pre>
<p>To call method dynamically we do this:</p>
<pre class="brush: perl;">
$drew-&gt;${ \'battle_cry' };   # =&gt; Drew says zing!!!
</pre>
<p>Create <code>colour</code> method closing over $colour_name (ie. closure):</p>
<pre class="brush: perl;">
my $colour_name = 'black';

Ninja-&gt;meta-&gt;add_method( colour =&gt; sub {
    my $self = shift;
    say &quot;${ \$self-&gt;name }'s colour is $colour_name&quot;;
});

$drew-&gt;colour;    # =&gt; Drew's colour is black
$adam-&gt;colour;    # =&gt; Adam's colour is black
</pre>
<p>Finally&#8230; <em>&#8220;defining a method dynamically on an instance that closes over local scope and accesses the instance’s state&#8221;</em></p>
<pre class="brush: perl;">
my $sword_symbol = '********';

$drew-&gt;add_singleton_method( swing =&gt; sub {
    my ($self, $sound_effect) = @_;
    say &quot;${ \$self-&gt;name }: $sword_symbol $sound_effect&quot;;
});

$drew-&gt;swing( 'slash!!' );   # =&gt; Drew: ********* slash!!
</pre>
<p>Everything nicely works the same as the Ruby &amp; Javascript blog examples.</p>
<p>To round things off, below is the complete example but with <a href="http://search.cpan.org/dist/MooseX-Declare/">MooseX::Declare</a> sugar stirred into the pot.</p>
<pre class="brush: perl;">
use Modern::Perl;
use MooseX::Declare;

class Ninja with MooseX::SingletonMethod::Role is mutable {
    has name =&gt; ( is =&gt; 'rw', isa =&gt; 'Str' );
}

my $drew = Ninja-&gt;new( name =&gt; 'Drew' );
my $adam = Ninja-&gt;new( name =&gt; 'Adam' );

###########################################################

class Ninja is mutable {
    method battle_cry {
        say $self-&gt;name . ' says zing!!!';
    }
}

$drew-&gt;battle_cry;   # =&gt; Drew says zing!!!
$adam-&gt;battle_cry;   # =&gt; Adam says zing!!!

###########################################################

$drew-&gt;add_singleton_method( throw_star =&gt; sub {
    say &quot;throwing star&quot;;
});

$drew-&gt;throw_star;   # =&gt; throwing a star

###########################################################

$drew-&gt;${ \'battle_cry' };   # =&gt; Drew says zing!!!

###########################################################

my $colour_name = 'black';

Ninja-&gt;meta-&gt;add_method( colour =&gt; sub {
    my $self = shift;
    say &quot;${ \$self-&gt;name }'s colour is $colour_name&quot;;
});

$drew-&gt;colour;    # =&gt; Drew's colour is black
$adam-&gt;colour;    # =&gt; Adam's colour is black

###########################################################

my $sword_symbol = '********';

$drew-&gt;add_singleton_method( swing =&gt; sub {
    my ($self, $sound_effect) = @_;
    say &quot;${ \$self-&gt;name }: $sword_symbol $sound_effect&quot;;
});

$drew-&gt;swing( 'slash!!' );   # =&gt; Drew: ********* slash!!
</pre>
<p>/I3az/</p>
<p>PS.  If you want Moose in Javascript then have a look at <a href="http://code.google.com/p/joose-js/">Joose</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/813/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/813/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/813/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=813&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/01/13/anyone_for_metaprogramming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Receiving contributions to your Github project</title>
		<link>http://transfixedbutnotdead.com/2010/01/04/receiving-contributions-to-your-github-project/</link>
		<comments>http://transfixedbutnotdead.com/2010/01/04/receiving-contributions-to-your-github-project/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 20:52:16 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=799</guid>
		<description><![CDATA[Received my first ever contribution to one of my Github projects today. A pull request from a cpanservice? And I wasn&#8217;t the only one or was wondering who this cpanservice is or was?
I suspect that this as something to do with the recent gitPAN upload to Github and therefore is probably some automated service that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=799&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Received my first ever contribution to one of my <a href="http://github.com/draegtun/builder">Github projects</a> today. A pull request from a <a href="http://github.com/cpanservice">cpanservice?</a> And I wasn&#8217;t the <a href="http://twitter.com/miyagawa/status/7317230829">only one</a> or was wondering who this <em>cpanservice</em> is or was?</p>
<p>I suspect that this as something to do with the recent <a href="http://github.com/gitpan/">gitPAN</a> upload to <a href="http://github.com">Github</a> and therefore is probably some automated service that is going through related projects making sure that Github CPAN projects do have the <a href="http://github.com/draegtun/builder/commit/df5a0cbdebcde2ec26bd41b2fa190d3dd66d929e">meta repository tag populated</a> in the build process.  </p>
<p><em>NB. I blogged about this repository link back in <a href="http://transfixedbutnotdead.com/2009/05/01/repository-link-now-appearing-on-cpan/">May</a> but forgot to put my changes live.</em> *blush*</p>
<p>This contribution was the necessary nudge I needed to find out how to use git to merge in external changes.  Github itself did seem to provide a web option to apply this change directly under &#8220;Fork Queue&#8221;.  However I wanted to do it all via git so first place I looked is the Github documention on <a href="http://github.com/guides/pull-requests">pull requests</a>.</p>
<p>My local directory was up-to-date so I just needed to do the following to pull &amp; merge into my code:</p>
<ul>
<li><code>git pull git://github.com/cpanservice/builder.git master</code></li>
</ul>
<p>All merged and committed (see PS).  Quick check of diffs &amp; logs and then just needed to populate it back to Github:</p>
<ul>
<li><code>git push origin master</code></li>
</ul>
<p>You will see <em>cpanservice</em> changes immediately in the commits.   However the Github graphs and fork queue take a little while to be updated to show the merge.</p>
<p>/I3az/</p>
<p>&nbsp;</p>
<p>PS. The merged <em>cpanservice</em> changes showed up under me in the network graph (see red line below) despite showing up correctly under commits.  </p>
<p><a href="http://www.flickr.com/photos/draegtun/4245104639/" title="github-builder-graph by draegtun, on Flickr"><img src="http://farm5.static.flickr.com/4061/4245104639_f111617a60.jpg" width="500" height="128" alt="github-builder-graph" /></a></p>
<p>I think this is because I merge changes locally and then pushed back to Github?  Its not an issue for these <em>cpanservice</em> changes but I would like to get it right for &#8220;proper&#8221; contributors.   </p>
<p>So I think the alternate merge example documented by Github might be the better approach?</p>
<p><code>git remote add defunkt git://github.com/defunkt/grit.git<br />
 git fetch defunkt<br />
 git merge defunkt/master</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/799/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/799/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/799/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/799/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/799/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/799/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/799/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/799/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/799/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/799/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=799&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/01/04/receiving-contributions-to-your-github-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>

		<media:content url="http://farm5.static.flickr.com/4061/4245104639_f111617a60.jpg" medium="image">
			<media:title type="html">github-builder-graph</media:title>
		</media:content>
	</item>
		<item>
		<title>Couple of CPAN pressies</title>
		<link>http://transfixedbutnotdead.com/2009/12/26/couple-of-cpan-pressies/</link>
		<comments>http://transfixedbutnotdead.com/2009/12/26/couple-of-cpan-pressies/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 23:17:02 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Devel::Declare]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=783</guid>
		<description><![CDATA[Just uploaded a couple of new modules to CPAN:

Acme::URL
PerlX::QuoteOperator

The first one you is just a small xmas cracker that you will already know about from my &#8220;bare URL&#8221; post from last week.  Just pull, enjoy for a little while and then chuck away like most xmas cracker toys  
The second one is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=783&subd=draegtun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Just uploaded a couple of new modules to CPAN:</p>
<ul>
<li><a href="http://search.cpan.org/dist/Acme-URL/">Acme::URL</a>
<li><a href="http://search.cpan.org/dist/PerlX-QuoteOperator/">PerlX::QuoteOperator</a>
</ul>
<p>The first one you is just a small xmas cracker that you will already know about from my <a href="http://transfixedbutnotdead.com/2009/12/16/url-develdeclare-and-no-strings-attached/">&#8220;bare URL&#8221;</a> post from last week.  Just pull, enjoy for a little while and then chuck away like most xmas cracker toys <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The second one is a tad similar (ie. <a href="http://search.cpan.org/dist/Devel-Declare/">Devel::Declare</a>) but with a much more sympathetic syntax by allowing you to create new <a href="http://perldoc.perl.org/perlop.html#Quote-Like-Operators">Quote-Like Operators</a> in Perl with Perl.   </p>
<p>For a good end product exemplar have a look at <a href="http://search.cpan.org/dist/PerlX-QuoteOperator/lib/PerlX/QuoteOperator/URL.pm">PerlX::QuoteOperator::URL</a> included with the distribution:</p>
<pre class="brush: perl;">
use PerlX::QuoteOperator::URL 'qh';

my $content = qh{ http://transfixedbutnotdead.com/ };
</pre>
<p>There is no scary parsing going on with this example.  PerlX::QuoteOperator / Devel::Declare simply hits the &#8216;qh&#8217; keyword and converts it to:</p>
<pre class="brush: perl;">
qh qq{ http://transfixedbutnotdead.com/ }
</pre>
<p>And &#8216;qh&#8217; is a subroutine with a ($) prototype.   So nothing too sinister (unless you really do abhor subroutine prototypes!), just a simple macro which gives the appearance that we have new quote-like operators.</p>
<p>Certainly an interesting concept to be able to produce new quote-like operators in Perl.  So hopefully PerlX::QuoteOperator might find its way under a few xmas trees <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Merry Xmas &amp; happy St. Stephen&#8217;s day to everyone.</p>
<p>/I3az/</p>
<p>PS.  I chose the PerlX::* because <a href="http://search.cpan.org/~gugod/">gugod</a> as already provided some wonderful Devel::Declare Perl extending modules under this <a href="http://search.cpan.org/search?query=perlx%3A%3A*&amp;mode=distributions">namespace</a>.   I feel its in the same vein so hopefully a good place for it to live.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/783/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/783/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/783/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/783/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/783/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/783/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/783/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/783/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/783/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/783/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&blog=351142&post=783&subd=draegtun&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2009/12/26/couple-of-cpan-pressies/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
	</channel>
</rss>