<?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/"
	>

<channel>
	<title>dagolden &#187; dagolden</title>
	<atom:link href="http://www.dagolden.com/index.php/author/david/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagolden.com</link>
	<description>Whatever comes to mind</description>
	<lastBuildDate>Thu, 09 Sep 2010 10:31:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Hacking the Perl core for smarter push and pop</title>
		<link>http://www.dagolden.com/index.php/1014/hacking-the-perl-core-to-push-and-pop-to-references/</link>
		<comments>http://www.dagolden.com/index.php/1014/hacking-the-perl-core-to-push-and-pop-to-references/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 21:33:24 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl-programming]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1014</guid>
		<description><![CDATA[In a recent post, I said I wished that Perl's built in functions for array containers would work directly on references. Rather than this (today): # Assuming $data-&#62;{$key1}{$key2} = [ qw/foo bar/ ] push @{ $data-&#62;{$key1}{$key2} }, @stuff; I wanted this (in the future): # Assuming $data-&#62;{$key1}{$key2} = [ qw/foo bar/ ] push $data-&#62;{$key1}{$key2}, @stuff; [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://www.dagolden.com/index.php/986/if-perl-were-smarter-about-references/">recent post</a>, I said I wished that Perl's built in functions for array containers would work directly on references.</p>
<p>Rather than this (today):</p>
<pre class="brush: perl;">
# Assuming $data-&gt;{$key1}{$key2} = [ qw/foo bar/ ]
push @{ $data-&gt;{$key1}{$key2} }, @stuff;
</pre>
<p>I wanted this (in the future):</p>
<pre class="brush: perl;">
# Assuming $data-&gt;{$key1}{$key2} = [ qw/foo bar/ ]
push $data-&gt;{$key1}{$key2}, @stuff;
</pre>
<p>I've finished a draft implementation that works for push, pop, shift, unshift and splice.  All existing Perl tests pass, as do new tests I've written that explore this new functionality.  It will even auto-vivify as needed:</p>
<pre class="brush: perl;">
my $foo;
push $foo, @stuff; # $foo is now an arrayref
</pre>
<p>I'm still working on keys, values and each and those look much harder, but I hope to have something to share by next week.</p>
<p><em>Updated: I added example data to the "given $data..." comments to clarify that it's an example, not a recommendation about how to initialize a data structure.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1014/hacking-the-perl-core-to-push-and-pop-to-references/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>How to script git with perl and Git::Wrapper</title>
		<link>http://www.dagolden.com/index.php/998/how-to-script-git-with-perl-and-gitwrapper/</link>
		<comments>http://www.dagolden.com/index.php/998/how-to-script-git-with-perl-and-gitwrapper/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 03:17:41 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=998</guid>
		<description><![CDATA[If you work with git, eventually you will want to script something that git doesn't do already and can't be accomplished with an alias. If you use Perl, the Git::Wrapper module makes scripting git easy. The big advantage of Git::Wrapper is that it wraps the binary version of git, which keeps your perl and git [...]]]></description>
			<content:encoded><![CDATA[<p>If you work with <a href="http://git-scm.com/">git</a>, eventually you will want to script something that git doesn't do already and can't be accomplished with an alias.  If you use <a href="http://perl.org/">Perl</a>, the <a href="http://p3rl.org/Git::Wrapper">Git::Wrapper</a> module makes scripting git easy.</p>
<p>The big advantage of Git::Wrapper is that it wraps the binary version of git, which keeps your perl and git independent.  Upgrade perl and not git?  Add Git::Wrapper and you're done.  Upgrade git while keeping your existing perl?  No problem.  If you get your git from an OS distribution package, but <a href="http://p3rl.org/App::perlbrew">roll your own perl</a>, then Git::Wrapper is for you!</p>
<p>Git::Wrapper just makes it really easy to pass git commands and get back useful data.  It really shines on "git log" commands, as it parses each commit message into Git::Wrapper::Log objects with accessors for id, author, date, and message.  For everything else, it's not much more than a wrapper around qx(), but it returns arrays of lines and throws exceptions when things go wrong, which just saves a little time and code.</p>
<p>Here is a short example that I whipped up recently to automate the process of adding a <a href="http://github.com/">github</a> repository remote for someone when they send me a pull request.  (It also uses my <a href="http://p3rl.org/Getopt::Lucid">Getopt::Lucid</a> module, but as the name suggests, it should be clear what that does.)</p>
<pre class="brush: perl;">
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use autodie;
use Git::Wrapper;
use Getopt::Lucid qw/:all/;

# USAGE: github-remote [-r REPO] [NAME]
#     NAME -- a github user name (or defaults to 'dagolden')
#     REPO -- a github repository path (or is parsed out of my private origin repo)

my $opts = Getopt::Lucid-&gt;getopt([
  Param('repo|r'),
]);

my $who = shift @ARGV;

# Get a wrapper for the current directory
my $git = Git::Wrapper-&gt;new(&quot;.&quot;);

# Locate the origin repository URL
my ($origin) = grep { /origin/ } $git-&gt;remote(&quot;-v&quot;);
die &quot;Couldn't determine origin\n&quot; unless $origin;
$origin =~ s/^origin\s+//;
$origin =~ s/\s+\(.*$//;

# Parse out the repository path
my $repo = $opts-&gt;get_repo;
unless ( $repo ) {
  # me@git.example.com:my-repo-name.git
  ($repo) = $origin =~ m/^[^:]+:(.+)$/;
}

# Set up someone else's github repo
if ( $who ) {
  $git-&gt;remote(&quot;add&quot;, $who, &quot;git://github.com/${who}/${repo}&quot;);
}
# Or set up my own github mirror
else {
  $git-&gt;remote(&quot;add&quot;, &quot;github&quot;, &quot;git\@github.com:dagolden/${repo}&quot;);
}
</pre>
<p>That's it.  I admit the program is a little crufty because of how I manage my repositories with a private origin that I mirror to a github repository, but there's almost no cruft around interactions with git.  Consider this:</p>
<pre class="brush: perl;">
  $git-&gt;remote(&quot;add&quot;, $who, &quot;git://github.com/${who}/${repo}&quot;);
</pre>
<p>If the command fails (if there's already $who as a remote name), an exception will be thrown. That means I don't have to write any error handling myself, which is perfect for a simple automation program like this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/998/how-to-script-git-with-perl-and-gitwrapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are you ready for CPAN Testers 2.0?</title>
		<link>http://www.dagolden.com/index.php/1000/are-you-ready-for-cpan-testers-2-0/</link>
		<comments>http://www.dagolden.com/index.php/1000/are-you-ready-for-cpan-testers-2-0/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 03:25:40 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[cpan-testers]]></category>
		<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1000</guid>
		<description><![CDATA[If you haven't seen the official notice, the CPAN Testers project is migrating from using email to send reports (CPAN Testers 1.0) to using web-based submission (CPAN Testers 2.0). As of September 1, 2010, the old email list will be shut down and only web submissions will be accepted. I've just updated the "quick-start" documentation [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven't seen the <a href=" http://blog.cpantesters.org/diary/87">official notice</a>, the CPAN Testers project is migrating from using email to send reports (CPAN Testers 1.0) to using web-based submission (CPAN Testers 2.0).  As of September 1, 2010, the old email list will be shut down and only web submissions will be accepted.</p>
<p>I've just updated the "quick-start" documentation on the CPAN Testers wiki: <a href="http://wiki.cpantesters.org/wiki/QuickHowToCT20">Quick HowTo for CPAN Testers 2.0</a></p>
<p>It's not perfect, but it's a lot better than it used to be.  If you are still submitting reports by email, please read and follow the instructions before the end of August.  If you have trouble, please ask for help on the cpan-testers-discuss <a href="http://wiki.cpantesters.org/wiki/MailingLists">mailing list</a> or on #cpantesters-discuss on irc.perl.org.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1000/are-you-ready-for-cpan-testers-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If Perl were smarter about references</title>
		<link>http://www.dagolden.com/index.php/986/if-perl-were-smarter-about-references/</link>
		<comments>http://www.dagolden.com/index.php/986/if-perl-were-smarter-about-references/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 03:49:28 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=986</guid>
		<description><![CDATA[I wish that Perl 5 could be smarter about references. I wish I could just give an array reference to functions that only act on arrays and have Perl do the dereferencing for me. Here is what I have to write today to use array functions on an array reference: # Given $obj-&#62;foo() that returns [...]]]></description>
			<content:encoded><![CDATA[<p>I wish that Perl 5 could be smarter about references.  I wish I could just give an array reference to functions that only act on arrays and have Perl do the dereferencing for me.</p>
<p>Here is what I have to write today to use array functions on an array reference:</p>
<pre class="brush: perl;">
# Given $obj-&gt;foo() that returns an array reference

shift @{ $obj-&gt;foo };
push @{ $obj-&gt;foo }, @stuff;
splice @{ $obj-&gt;foo }, 0, 2;
</pre>
<p>Here is how I wish it would work:</p>
<pre class="brush: perl;">
shift $obj-&gt;foo;
push $obj-&gt;foo, @stuff;
splice $obj-&gt;foo, 0, 2;
</pre>
<p>Isn't that second block a lot cleaner to read?  Getting rid of the <code>@{}</code> declutters the code and, at least for me, it's still clear from the context that I expect the first argument to act like an array.</p>
<p>Likewise, I'd like to have the same magic work for functions like <code>values</code> or <code>keys</code>, which would let me flatten array references or get an index list in a more readable way:</p>
<pre class="brush: perl;">
# from this:
for ( @{ $obj-&gt;foo } ) { ... }
for ( $#{ $obj-&gt;foo } ) { ... }

# to this:
for ( values $obj-&gt;foo ) { ... }
for ( keys $obj-&gt;foo ) { ... }
</pre>
<p>I suspect something similar would make sense for hash references, too.</p>
<p>On reflection, I think this would mean that checking that the first argument indeed held an array reference would have to be done at run-time, but I suspect there might be a way within the Perl op-codes to avoid such a checks except when necessary.  (Thus, you could still use <code>@{}</code> for a slight bit of hand-optimization, if desired.)</p>
<p>I wish I knew more Perl guts to work on a draft implementation, because right now I think this would be one of the coolest features to see in a future Perl.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/986/if-perl-were-smarter-about-references/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Thoughts on Perl 6 hype and backlash</title>
		<link>http://www.dagolden.com/index.php/947/thoughts-on-perl-6-hype-and-backlash/</link>
		<comments>http://www.dagolden.com/index.php/947/thoughts-on-perl-6-hype-and-backlash/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 02:44:32 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[parrot]]></category>
		<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[perl6]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=947</guid>
		<description><![CDATA[The news of "Rakudo Star" (a Perl 6 compiler) has spawned enough hype to prompt a backlash. I haven't entirely decided whether I think this is significant or not, much less good or bad for the Perl community, so this post is my attempt to organize my thoughts on it. Factually, Rakudo is not new [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://news.perlfoundation.org/2010/07/rakudo-star---a-useful-usable.html">news</a> of <a href="http://rakudo.org/">"Rakudo Star"</a> (a <a href="http://perl6.org/">Perl 6</a> compiler) has spawned enough hype to prompt a backlash.  I haven't entirely decided whether I think this is significant or not, much less good or bad for the Perl community, so this post is my attempt to organize my thoughts on it.</p>
<p>Factually, <b>Rakudo is not new</b> -- there have been thirty-one development releases of it.  But <strong>Rakudo Star is the first prototype of an end-user distribution tarball</strong> that includes the latest Rakudo, the Parrot virtual machine, existing documentation, build instructions and so on.  I would say it is <strong>designed for Perl 6 experimenters, rather than Perl 6 implementors</strong>.  It means that anyone interested in Perl 6 can now just do this:</p>
<pre class="brush: plain;">
$ tar xzf rakudo-star-2010.07.tar.gz
$ cd rakudo-star-2010.07/
$ more README
... satisfy library prereqs ...
$ perl Configure.pl --gen-parrot
$ make
$ make install
$ ./perl6 -e 'say &quot;Hello World&quot;'
</pre>
<p><strong>For the Perl 6 project team</strong> -- or more broadly, anyone carrying the Perl 6 torch for the last ten years -- the release of Rakudo Star has huge symbolic importance.  They're saying, in effect, <em>"look at this cool project we've been working on!  We want you to get as excited as we are about what Perl 6 will be able to do"</em>.  And, you know what, if I were working on something for ten years, I'd be wanting to celebrate, too.</p>
<p><strong>For those outside the project team</strong>, the significance of the release isn't so obvious.  I can imagine a wide range of reactions:</p>
<ul>
<li><em>"Cool!  I've been wanting to try some Perl 6 but didn't know where to start."</em></li>
<li><em>"What's the big deal?  I can't use it for anything real yet."</em></li>
<li>"This sucks.  It's too (big|slow|buggy|incomplete)."</li>
<li><em>"Gee, thanks.  Perl 6 gets the attention and Perl 5 gets ignored... again"</em></li>
<li><em>"Perl 6?"</em></li>
</ul>
<p><strong>There is no way reactions to Rakudo Star can possibly live up to the hopes and dreams of those involved the project</strong>.  I'm not surprised that some of the project members <a href="http://www.modernperlbooks.com/mt/2010/07/an-accurate-comparison-of-perl-5-and-rakudo-star.html">seem defensive</a> in the face of criticism.</p>
<p>Leaving the emotional reactions aside, <strong>Rakudo Star still is a significant step forward for Perl 6</strong>, as it means inviting a less dedicated group of participants to test and react to the evolution of both the language and the implementation.  Some of that will be negative, but some will be positive.  More importantly, it will provide focus to the project going forward and shift the mentality -- gradually, one hopes -- from "get it absolutely right" to "get it done".</p>
<p>In the past, I've felt that the Perl 6 effort has been a distraction for Perl 5.  On reflection, I've decided that the release of <strong>Rakudo Star is good for Perl 5 because it makes it easier for people to assess the relative status of both</strong>. Now, more than ever, it's clear that Perl 6 is not going to sweep Perl 5 away any time soon, but people who <em>are</em> interested in the comparison can watch both evolve and decide where they want to invest their time.  </p>
<p>It's also pretty clear that Perl 6 is not going to make substantial inroads against Python, Ruby, PHP and other dynamic languages any time soon, either.  <strong>If anyone was waiting for Perl 6 to rescue Perl, then they'll need to keep waiting.</strong></p>
<p>However, <strong>Rakudo Star will help demonstrate common strengths</strong> of the current incarnation of both Perl 5 and Perl 6 language development.</p>
<ul>
<li><strong>Timeboxed delivery</strong> -- both projects are now delivering regular, packaged development releases that users can unpack, install and explore to see how new features evolve and how it works with previously written code.</li>
<li><strong>Tests and a testing culture</strong> -- both Perl 5 and Perl 6 are backed by thousands of tests that help catch potential errors or behavior regressions</li>
<li><strong>CPAN</strong> -- Perl 5 already has it (and it's adding 1,000 distributions a month) and some of the early work by the Perl 6 community has been to start porting some of the more popular Perl 5 modules into Perl 6.</li>
<li><strong>Community</strong> -- there are dozens (or more) Perl conferences each year. These have often included talks on Perl 6 and this trend will likely continue.  While Perl 5 and Perl 6 are different languages, they share not only a common heritage but a common culture as well</li>
</ul>
<p>I suggest that people put the release of Rakudo Star in perspective.  It is not a game-changer, but it is still a big step forward.  Those who delivered it deserve kudos not brickbats, and I look forward to a next release that is even better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/947/thoughts-on-perl-6-hype-and-backlash/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Creating new distributions with Dist::Zilla</title>
		<link>http://www.dagolden.com/index.php/955/creating-new-distributions-with-distzilla/</link>
		<comments>http://www.dagolden.com/index.php/955/creating-new-distributions-with-distzilla/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 10:32:13 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[dzil]]></category>
		<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=955</guid>
		<description><![CDATA[You may already know that Dist::Zilla can create new boilerplate Perl distributions, just like Module::Starter (and other boilerplate generators). $ dzil new My::Module If you've ever tried this, you've seen that the built-in boilerplate is very, very minimal and you probably want to know how to customize it to fit your dzil style. I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>You may already know that <a href="http://search.cpan.org/perldoc?Dist::Zilla">Dist::Zilla</a> can create new boilerplate Perl distributions, just like <a href="http://search.cpan.org/perldoc?Module::Starter">Module::Starter</a> (and other boilerplate generators).  </p>
<pre class="brush: plain;">
$ dzil new My::Module
</pre>
<p>If you've ever tried this, you've seen that the built-in boilerplate is very, very minimal and you probably want to know how to customize it to fit your dzil style.</p>
<p>I wrote up the tutorial below and submitted it for consideration for <a href="http://dzil.org/">dzil.org</a>.  If you use dzil, I hope you'll find it to be a useful step-by-step guide.  Feedback is welcome, either in comments below or via <a href="http://github.com/dagolden/dzil.org/tree/minting-profile">my dzil.org branch</a> on <a href="http://github.com/">github</a>.  I also want to thank <a href="http://www.xenoterracide.com/">xenoterracide</a> for writing <a href="http://www.xenoterracide.com/2010/07/creating-new-projects-with-dzil-new-and.html">"Creating new projects with dzil new and templates"</a>, which was a huge help to me in figuring out how this works.  Several of the examples below were taken or adapted from his article.</p>
<h2>Customizing the Minting Process</h2>
<p>Dist::Zilla lets you create any number of "minting profiles" to create distributions with different default contents. You might have one for work and one for personal code; one for object-oriented code and one for functional code; or one for web applications and one for command-line applications, etc.</p>
<h2>Preparation</h2>
<p>For the tasks below you'll want to:</p>
<ul>
<li>install Dist::Zilla, version 4.101780 or later</li>
<li>run "dzil setup"</li>
</ul>
<p>The rest of this document assumes that you haven't already made a custom minting profile, meaning that you haven't got anything in ~/.dzil/profiles. If you have a default profile, just rename it if you want to follow the steps exactly as described below.</p>
<h2>Create a default profile</h2>
<p>Create a directory called ~/.dzil/profiles/default. This will hold your default minting profile, overriding the very simple default that ships with Dist::Zilla.</p>
<p>The first thing you want to do is change into that directory and create a profile.ini file with the following content:</p>
<pre class="brush: plain;">
[TemplateModule/:DefaultModuleMaker]
template = Module.pm

[GatherDir::Template]
root = skel
include_dotfiles = 1
</pre>
<p>The profile.ini file defines two components for minting your new distribution. The first one, TemplateModule, is given a special name &#58;DefaultModuleMaker, to tell Dist::Zilla that this component will be used for creating the new module file. The template parameter tells it a file to use, so create a Module.pm file (in the same directory as profile.ini) with the following content:</p>
<pre class="brush: plain;">
use strict;
use warnings;
package {{$name}};

1;
</pre>
<p>The second component in profile.ini is GatherDir::Template, which specifies a directory of templates that will also be created in your new distribution. That is where you'll be putting your custom dist.ini, Changes or other files.</p>
<p>Create ~/.dzil/profiles/default/skel and change to that directory.</p>
<p>Next, create a dist.ini file with the following content:</p>
<pre class="brush: plain;">
{{
    $license = ref $dist-&gt;license;
    if ( $license =~ /^Software::License::(.+)$/ ) {
        $license = $1;
    } else {
        $license = &quot;=$license&quot;;
    }

    $authors = join( &quot;\n&quot;, map { &quot;author  = $_&quot; } @{$dist-&gt;authors} );
    $copyright_year = (localtime)[5] + 1900;
    '';
}}name    = {{$dist-&gt;name}}
{{$authors}}
license = {{$license}}
copyright_holder = {{$dist-&gt;copyright_holder}}
copyright_year   = {{$copyright_year}}

[@Basic]
</pre>
<p>Ignore all the gobbledy-gook at the top and notice the [@Basic] line. this will give you a dist.ini in your new directory that uses the @Basic plugin bundle. As you become more familiar with Dist::Zilla, this is where you'll want to add more plugins to customize what Dist::Zilla can do for you.</p>
<p>Change to your work directory and run dzil new My::Module. You should get a new distribution that is almost exactly like the original default included with Dist::Zilla, except that it has the addition of the @Basic plugin bundle in the new dist.ini file.</p>
<p>Now, all you have to do is customize the dist.ini and Module.pm files in minting profile to suit your own personal style.</p>
<h2>Enhancing your minting profile</h2>
<p>You can create other files in skel as well. For example, if you use git, you might want to create a starter .gitignore:</p>
<pre class="brush: plain;">
/{{$dist-&gt;name}}*
.build
</pre>
<p>Or, if you start using the NextRelease plugin, you probably want to have a Changes file that takes advantage of it:</p>
<pre class="brush: plain;">
Revision history for {{$dist-&gt;name}}

{{ '{{$NEXT}}' }}
    -
</pre>
<p>In the sample above, you can see the syntax for including template text inside a template, which might be useful for other skeleton files as well.</p>
<h2>Setting up an alternate minting profile</h2>
<p>The easiest way to set up an alternate profile is to copy your default profile to a new directory. For example, if you wanted to set up a profile that provided a Moose-specific starter module, you could create a copy like this:</p>
<pre class="brush: plain;">
$ cp -a ~/.dzil/profiles/default ~/.dzil/profiles/moose
</pre>
<p>Then, customize the ~/.dzil/profiles/moose/Module.pm file to load Moose and provide any boilerplate you like.</p>
<p>You can run dzil new with the -p flag to use the alternate profile:</p>
<pre class="brush: plain;">
$ dzil new -p moose My::Moose::Module
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/955/creating-new-distributions-with-distzilla/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Parallel map with Parallel::Iterator</title>
		<link>http://www.dagolden.com/index.php/935/parallel-map-with-paralleliterator/</link>
		<comments>http://www.dagolden.com/index.php/935/parallel-map-with-paralleliterator/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 13:40:51 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=935</guid>
		<description><![CDATA[Do you have a multi-core processor? Would you like an easy way for Perl to use all your cores to run an iterative task in parallel? Then you should check out Parallel::Iterator. Parallel::Iterator provides a very simple API to execute a "map" function in parallel across multiple processes. It handles all the forking and inter-process [...]]]></description>
			<content:encoded><![CDATA[<p>Do you have a multi-core processor?  Would you like an easy way for Perl to use all your cores to run an iterative task in parallel?  Then you should check out <a href="http://search.cpan.org/perldoc?Parallel::Iterator">Parallel::Iterator</a>.</p>
<p>Parallel::Iterator provides a very simple API to execute a "map" function in parallel across multiple processes.  It handles all the forking and inter-process communication for you, so all you have to do is focus on the task at hand.  This is useful for a CPU-intensive task that you'd like to spread across multiple cores or for tasks with relatively long I/O delays.</p>
<p>Here is a very simple example, adapted from the documentation.  Suppose you need to fetch a lot of web-pages from URL's provided on STDIN.  You just need to write the "worker" subroutine to fetch a page and Parallel::Iterator does the rest.</p>
<pre class="brush: perl;">
use strict;
use warnings;
use LWP::UserAgent;
use Parallel::Iterator qw/iterate_as_array/;

# this worker fetches a page or returns undef
my $ua = LWP::UserAgent-&gt;new( env_proxy =&gt; 1 );
my $worker = sub {
  my $url = shift;
  my $resp = $ua-&gt;get($url);
  return undef unless $resp-&gt;is_success;
  return $resp-&gt;decoded_content;
};

# this gets a list of pages and fetches them in parallel
my @urls = split &quot;\n&quot;, do { local $/; &lt;STDIN&gt; };
my @pages = iterate_as_array( $worker, @urls );

# now do stuff with the results
...
</pre>
<p>With just that little code, the URL's to fetch are split across 10 sub-processes, the page fetching happens in parallel and the results are collected into the <code>@pages</code> array.</p>
<p>Parallel::Iterator has a number of additional features for customizing the number of subprocesses, or iterating the results (instead of getting back an array) and for batching the input to subprocesses.</p>
<p>It may not be the right tool all of the time, but if you need to parallelize a task quickly, Parallel::Iterator should be in your tool-box.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/935/parallel-map-with-paralleliterator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>perlprogramming.org looking for a nice home</title>
		<link>http://www.dagolden.com/index.php/925/perlprogramming-org-looking-for-a-nice-home/</link>
		<comments>http://www.dagolden.com/index.php/925/perlprogramming-org-looking-for-a-nice-home/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 04:33:33 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=925</guid>
		<description><![CDATA[I picked up this domain name a while ago since it was available and people were saying how Perl needs better visibility. (I was probably inspired by Tim's post about TIOBE). Currently, I just redirect to perl.org. The domain is coming up for renewal and I'll gladly sign it over to someone who can make [...]]]></description>
			<content:encoded><![CDATA[<p>I picked up this domain name a while ago since it was available and people were saying how Perl needs better visibility.  (I was probably inspired by Tim's <a href="http://blog.timbunce.org/2009/05/17/tiobe-index-is-being-gamed/">post about TIOBE</a>).  Currently, I just <a href="http://perlprogramming.org/">redirect</a> to perl.org.  The domain is coming up for renewal and I'll gladly sign it over to someone who can make a good case for what they plan to do with it to benefit the perl community.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/925/perlprogramming-org-looking-for-a-nice-home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My OSCON talks are online</title>
		<link>http://www.dagolden.com/index.php/920/my-oscon-talks-are-online/</link>
		<comments>http://www.dagolden.com/index.php/920/my-oscon-talks-are-online/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 02:17:08 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[cpan-testers]]></category>
		<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=920</guid>
		<description><![CDATA[I've posted my OSCON talks (one regular talk and one lightning talk) in my Talks page. But for those wanting direct links, here they are: Free QA! -- a non-technical talk about the history and social architecture choices of the CPAN Testers project Perl 5, Version 13 -- a lightning talk summarizing notable changes in [...]]]></description>
			<content:encoded><![CDATA[<p>I've posted my OSCON talks (one regular talk and one lightning talk) in my <a href="http://www.dagolden.com/index.php/talks/">Talks</a> page.  But for those wanting direct links, here they are:</p>
<ul>
<li><a href='http://www.dagolden.com/wp-content/uploads/2009/04/Free-QA-OSCON-2010.pdf'>Free QA!</a> -- a non-technical talk about the history and social architecture choices of the CPAN Testers project</li>
<li><a href="http://www.dagolden.com/wp-content/uploads/2010/07/Perl-5-Version-13.pdf">Perl 5, Version 13</a> -- a lightning talk summarizing notable changes in the Perl 5.13 development series</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/920/my-oscon-talks-are-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl 5.13.3 is released</title>
		<link>http://www.dagolden.com/index.php/907/perl-5-13-3-is-released/</link>
		<comments>http://www.dagolden.com/index.php/907/perl-5-13-3-is-released/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 12:40:07 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl-programming]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=907</guid>
		<description><![CDATA[[Reposted from my announcement to the the perl5-porters mailing list] Look at Crowley, doing 110 mph on the M40 heading towards Oxfordshire. Even the most resolutely casual observer would notice a number of strange things about him. The clenched teeth, for example, or the dull red glow coming from behind his sunglasses. And the car. [...]]]></description>
			<content:encoded><![CDATA[<p>[Reposted from my <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2010/07/msg162230.html">announcement</a> to the the perl5-porters mailing list]</p>
<blockquote><p>
Look at Crowley, doing 110 mph on the M40 heading towards<br />
Oxfordshire.  Even the most resolutely casual observer would<br />
notice a number of strange things about him.  The clenched teeth,<br />
for example, or the dull red glow coming from behind his<br />
sunglasses.  And the car.  The car was a definite hint.</p>
<p>Crowley had started the journey in his Bentley, and he was<br />
dammned if he wasn't going to finish it in the Bentley as well.<br />
Not that even the kind of car buff who owns his own pair of<br />
motoring goggles would have been able to tell it was a vintage<br />
Bentley.  Not any more.  They wouldn't have been able to tell<br />
that it was a Bentley.  They would only offer fifty-fifty that it<br />
had ever even been a car.</p>
<p>There was no paint left on it, for a start.  It might still have<br />
been black, where it wasn't a rusty, smudged reddish-brown, but<br />
this was a dull charcoal black.  It traveled in its own ball of<br />
flame, like a space capsule making a particularly difficult<br />
re-entry.</p>
<p>There was a thin skin of crusted, melted rubber left around the<br />
metal wheel rims, but seeing that the wheel rims were still<br />
somhow riding an inch above the road surface this didn't seem to<br />
make an awful lot of difference to the suspension.</p>
<p>   It should have fallen apart miles back.</p>
<p>           <strong>-- Neil Gaiman and Terry Pratchett, "Good Omens"</strong>
</p></blockquote>
<p>It gives me great pleasure to announce the release of Perl 5.13.3.</p>
<p>This is the fourth DEVELOPMENT release in the 5.13.x series leading to a stable release of Perl 5.14.0. You can find a list of high-profile changes in this release in the file "perl5133delta.pod" inside the distribution.</p>
<p>You can (or will shortly be able to) download the 5.13.3 release from:</p>
<p>  <a href="http://search.cpan.org/~dagolden/perl-5.13.3/">http://search.cpan.org/~dagolden/perl-5.13.3/</a></p>
<p>The release's SHA1 signatures are:</p>
<ul>
<li>SHA1: 58e802bcae597ca08a6933265d03b37420c80076  <a href="http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/perl-5.13.3.tar.bz2">perl-5.13.3.tar.bz2</a></li>
<li>SHA1: 75b1bb2585fcbc75bfa473fcf77318b3872d61a2  <a href="http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/perl-5.13.3.tar.gz">perl-5.13.3.tar.gz</a></li>
</ul>
<p>This release corresponds to commit 414abf8 in Perl's git repository.  It is tagged as 'v5.13.3'.</p>
<p>We welcome your feedback on this release.</p>
<p>If Perl 5.13.3 works well for you, please use the 'perlthanks' tool included with this distribution to tell the all-volunteer development team how much you appreciate their work.</p>
<p>If you discover issues with Perl 5.13.3, please use the 'perlbug' tool included in this distribution to report them.</p>
<p>If you write software in Perl, it is particularly important that you test your software against development releases. While we strive to maintain source compatibility with prior stable versions of Perl wherever possible, it is always possible that a well-intentioned change can have unexpected consequences. If you spot a change in a development version which breaks your code, it's much more likely that we will be able to fix it before the next stable release. If you only test your code against stable releases of Perl, it may not be possible to undo a backwards-incompatible change which breaks your code.</p>
<p>Perl 5.13.3 represents approximately one month of development since Perl 5.13.2, and contains 12,184 lines of changes across 575 files from 104 authors and committers.</p>
<p>Notable changes in this release:</p>
<ul>
<li>\o{...} has been added as a string escape for octals.</li>
<li>\N{} and charnames::vianame now know about the abbreviated character names listed by Unicode, such as NBSP, SHY, etc.</li>
<li>Most dual-life module have been synchronized with the latest production release on CPAN.</li>
<li>There is a new internal function PL_blockhook_register for XS code to hook into Perl's lexical scope mechanism</li>
</ul>
<p>There is one major known issue:</p>
<ul>
<li>Bug fixes involving CvGV reference counting break Sub::Name (currently version 0.04).  A patch has been sent upstream to the maintainer.</li>
</ul>
<p>Thank you to the following for contributing to this release:</p>
<p>Abhijit Menon-Sen, Abigail, Alex Davies, Alex Vandiver, Alexandr Ciornii, Andreas J. Koenig, Andrew Rodland, Andy Dougherty, Aristotle Pagaltzis, Arkturuz, Ben Morrow, Bo Borgerson, Bo Lindbergh, Brad Gilbert, Bram, Brian Phillips, Chas. Owens, Chip Salzenberg, Chris Williams, Craig A. Berry, Curtis Jewell, Dan Dascalescu, Daniel Frederick Crisman, Dave Rolsky, David Caldwell, David E. Wheeler, David Golden, David Leadbeater, David Mitchell, Dennis Kaarsemaker, Eric Brine, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gene Sullivan, George Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham Barr, H.Merijn Brand, Harmen, Hugo van der Sanden, James E Keenan, James Mastros, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Jim Cromie, John Peacock, Jos Boumans, Josh ben Jore, Karl Williamson, Kevin Ryde, Leon Brocard, Lubomir Rintel, Maik Hentsche, Marcus Holland-Moritz, Matt Johnson, Matt S Trout, Max Maischein, Michael Breen, Michael G Schwern, Moritz Lenz, Nga Tang Chan, Nicholas Clark, Nick Cleaton, Nick Johnston, Niko Tyni, Offer Kaye, Paul Marquess, Philip Hazel, Philippe Bruhat, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Richard Soderberg, Robin Barker, Ruslan Zakirov, Salvador Fandino, Salvador Ortiz Garcia, Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic, Steffen Mueller, Stepan Kasal, Steve Hay, Steve Peters, Sullivan Beck, Tim Bunce, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, Vincent Pit, Yuval Kogman, Yves Orton, Zefram, brian d foy, chromatic, kmx, Ævar Arnfjörð Bjarmason</p>
<p>Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.</p>
<p>Development versions of Perl are released monthly on or about the 20th of the month by a monthly "release manager". You can expect following upcoming releases:</p>
<ul>
<li>August 20       -   Florian Ragwitz</li>
<li>September 20    -   Steve Hay</li>
<li>October 20      -   Tatsuhiko Miyagawa</li>
<li>November 20     -   Chris Williams</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/907/perl-5-13-3-is-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
