<?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; toolchain</title>
	<atom:link href="http://www.dagolden.com/index.php/category/toolchain/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagolden.com</link>
	<description>Whatever comes to mind</description>
	<lastBuildDate>Mon, 23 Jan 2012 03:43:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Five ways to install module prereqs by hand</title>
		<link>http://www.dagolden.com/index.php/1528/five-ways-to-install-modules-prereqs-by-hand/</link>
		<comments>http://www.dagolden.com/index.php/1528/five-ways-to-install-modules-prereqs-by-hand/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 03:19:58 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1528</guid>
		<description><![CDATA[Have you ever tried installing a CPAN module's dependencies by hand? Imagine that you've downloaded a strange tarball or cloned a strange module repository. Running "perl Makefile.PL" or "perl Build.PL" gives you a long list of missing dependencies. How do you quickly install all those dependencies? Here are some options. See the last for a [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried installing a CPAN module's dependencies by hand?  Imagine that you've downloaded a strange tarball or cloned a strange module repository. Running "perl Makefile.PL" or "perl Build.PL" gives you a long list of missing dependencies.  How do you quickly install all those dependencies?</p>
<p>Here are some options.  See the last for a new way that I just cooked up and released to CPAN.</p>
<h2>Use your favorite CPAN client against the current directory</h2>
<p>Example:</p>
<pre class="brush: plain; title: ; notranslate">
$ cpan .
</pre>
<p>Beware that this also installs the module in the current directory, which may not be what you want.</p>
<p>cpanminus is smarter than that if you give it an option</p>
<pre class="brush: plain; title: ; notranslate">
$ cpanm --installdeps .
</pre>
<h2>For Module::Build-based modules: Build installdeps</h2>
<p>Example:</p>
<pre class="brush: plain; title: ; notranslate">
$ perl Build.PL
$ Build installdeps
</pre>
<h2>For (some) Module::Install-based modules: make installdeps</h2>
<p>Example:</p>
<pre class="brush: plain; title: ; notranslate">
$ perl Makefile.PL
$ make installdeps
</pre>
<p>Note that this requires the Makefile.PL to use the 'auto_install' plugin.</p>
<h2>For Dist::Zilla-based modules: dzil listdeps</h2>
<p>Example:</p>
<pre class="brush: plain; title: ; notranslate">
$ dzil listdeps | cpanm
# or
$ cpan $(dzil listdeps)
</pre>
<p>This requires installing Dist::Zilla any any dist.ini dependencies first:</p>
<pre class="brush: plain; title: ; notranslate">
$ cpanm Dist::Zilla
$ dzil authordeps | cpanm
</pre>
<p>(Notice a pattern here?)</p>
<h2>Anything with Makefile.PL or Build.PL: MYMETA and mymeta-requires</h2>
<p>Install the latest ExtUtils::MakeMaker, Module::Build and <a href="http://p3rl.org/App::mymeta_requires">App::mymeta_requires</a>.  Then configure as usual and run 'mymeta-requires' to get a list of dependencies.</p>
<p>Example:</p>
<pre class="brush: plain; title: ; notranslate">
$ perl Makefile.PL
$ mymeta-requires | cpanm
# or
$ cpan $(mymeta-requires)
</pre>
<p>A nice feature of 'mymeta-requires' is that it gives you access to all the different prerequisite types defined in the <a href="http://p3rl.org/CPAN::Meta::Spec">CPAN::Meta::Spec</a>.  So if a module offers 'develop' prerequisites, you can include those like this:</p>
<pre class="brush: plain; title: ; notranslate">
$ mymeta-requires --develop | cpanm
</pre>
<p>See the documentation for other ways to control which prerequisites are included in the output.</p>
<p><del datetime="2011-08-14T11:41:59+00:00">One drawback is that you'll still need to install any configuration prerequisites needed to run Makefile.PL or Build.PL, but that is true of all other recipes above (except that ones that use a CPAN client).</del></p>
<p><strong>Update:</strong> as of version 0.002, 'mymeta-requires' will fallback to a META.json|yml file and also picks up configuration prerequisites.  So now you can bootstrap completely like this:</p>
<pre class="brush: plain; title: ; notranslate">
# get configuration prerequisites
$ mymeta-requires | cpanm

# run configuration
$ perl Makefile.PL

# get any additional dynamic prerequisites from configuration
$ mymeta-requires | cpanm
</pre>
<p>Easy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1528/five-ways-to-install-modules-prereqs-by-hand/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Parallel make for perlbrew</title>
		<link>http://www.dagolden.com/index.php/1384/parallel-make-for-perlbrew/</link>
		<comments>http://www.dagolden.com/index.php/1384/parallel-make-for-perlbrew/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 20:52:12 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[p5p]]></category>
		<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1384</guid>
		<description><![CDATA[If you've ever built Perl from scratch, you probably know how much faster it can be to make and test in parallel. On the other hand, if you use perlbrew on a multi-core processor, you probably already figured out that it wasn't using all your processors. I was very pleased to discover an undocumented '-j' [...]]]></description>
			<content:encoded><![CDATA[<p>If you've ever built <a href="http://perl.org/">Perl</a> from scratch, you probably know how much faster it can be to make and test in parallel.  On the other hand, if you use <a href="http://p3rl.org/App::perlbrew">perlbrew</a> on a multi-core processor, you probably already figured out that it wasn't using all your processors.</p>
<p>I was very pleased to discover an undocumented '-j' option in perlbrew 0.17 that switches on parallel make:</p>
<pre class="brush: plain; title: ; notranslate">
$ perlbrew -j 5 install perl-5.12.3
</pre>
<p>Currently, this only runs make in parallel, but I've submitted a patch to make it switch on parallel testing as well (for recent Perl's that support it).  The patch also documents the option.</p>
<p>I hope the new version will be out soon, but if you have 0.17, you can already start using '-j' for a small speed boost.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1384/parallel-make-for-perlbrew/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Announcing Module::Build 0.3800</title>
		<link>http://www.dagolden.com/index.php/1378/announcing-modulebuild-0-3800/</link>
		<comments>http://www.dagolden.com/index.php/1378/announcing-modulebuild-0-3800/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 11:33:11 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1378</guid>
		<description><![CDATA[I'm pleased to announce the release of Module::Build 0.3800, available on a CPAN Mirror near you. The major enhancement since the 0.36XX series is support for CPAN Meta Spec version 2 files (MYMETA.json and META.json). Also, if you haven't kept up with Module::Build, the 0.3607 release was nearly a year ago and there have been [...]]]></description>
			<content:encoded><![CDATA[<p>I'm pleased to announce the release of Module::Build 0.3800, available on a CPAN Mirror near you.</p>
<p>The major enhancement since the 0.36XX series is support for CPAN Meta Spec version 2 files (MYMETA.json and META.json).  Also, if you haven't kept up with Module::Build, the 0.3607 release was nearly a year ago and there have been over 20 development releases, mostly fixing various bugs.  Here is an excerpt from the last year of Changes:</p>
<pre class="brush: plain; title: ; notranslate">
0.3800 - Sat Mar  5 15:11:41 EST 2011

  Summary of major changes since 0.3624:

    [ENHANCEMENTS]

    - Generates META.json and MYMETA.json consistent with version 2 of the
      CPAN Meta Spec. [David Golden]

  Also in this release:

  [BUG FIXES]

  - Autogenerated documentation no longer includes private actions from
    Module::Build's own release subclass. [Report by Timothy Appnel,
    fix by David Golden]

0.37_06 - Mon Feb 28 21:43:31 EST 2011

  [BUG FIXES]

  - prerequisites with the empty string instead of a version are
    normalized to &quot;0&quot;.  (RT#65909)

  [OTHER]

  - More Pod typo/link fixes [Hongwen Qiu]

0.37_05 - Sat Feb 19 20:43:23 EST 2011

  [BUG FIXES]

  - fixes failing ppm.t in perl core

  [OTHER]

  - Pod typo fixes [Hongwen Qiu]

0.37_04 - Wed Feb 16 15:27:21 EST 2011

  [OTHER]

  - moved scripts/ to bin/ for less confusing porting to bleadperl

0.37_03 - Wed Feb 16 09:54:05 EST 2011

  [BUG FIXES]

  - removed an irrelevant test in t/actions/installdeps.t that was causing
    failures on some Cygwin platforms

  [OTHER]

  - dropped configure_requires as some CPAN clients apparently get
    confused by having things in both configure_requires and requires

  - bumped Parse::CPAN::Meta build prereq to 1.4401

  - bumped CPAN::Meta prereq to 2.110420

  - Pod typo fixes [Hongwen Qiu]

0.37_02 - Mon Feb  7 21:05:30 EST 2011

  [BUG FIXES]

  - bumped CPAN::Meta prereq to 2.110390 to avoid a regression in 2.110360

0.37_01 - Thu Feb  3 03:44:38 EST 2011

  [ENHANCEMENTS]

  - Generates META.json and MYMETA.json consistent with version 2 of the
    CPAN Meta Spec. [David Golden]

  [BUG FIXES]

  - t/signature.t now uses a mocked Module::Signature; this should be
    more robust across platforms as it only needs to confirm that
    Module::Build is calling Module::Signature when expected

  [OTHER]

  - Added CPAN::Meta and Parse::CPAN::Meta to prerequisites and dropped
    CPAN::Meta::YAML

0.3624 - Thu Jan 27 11:38:39 EST 2011

  - Fixed pod2html directory bugs and fixed creation of spurious blib
    directory in core perl directory when running install.t (RT#63003)
    [Chris Williams]

0.3623 - Wed Jan 26 17:45:30 EST 2011

  - Fixed bugs involving bootstrapping configure_requires prerequisites
    on older CPANPLUS clients or for either CPAN/CPANPLUS when using
    the compatibility Makefile.PL

  - Added diagnostic output when configure_requires are missing for
    the benefit of users doing manual installation

0.3622 - Mon Jan 24 21:06:50 EST 2011

  - No changes from 0.36_21

0.36_21 - Fri Jan 21 11:01:28 EST 2011

  - Changed YAML::Tiny references to the new CPAN::Meta::YAML module
    instead, which is the YAML-variant that is going into the Perl core

0.36_20 - Fri Dec 10 15:36:03 EST 2010

  *** DEPRECATIONS ***

  - Module::Build::Version has been deprecated.  Module::Build now depends
    directly upon version.pm.  A pure-perl version has been bundled in inc/
    solely for bootstrapping in case configure_requires is not supported.
    M::B::Version remains as a wrapper around version.pm.

  - Module::Build::ModuleInfo has been deprecated.  Module::Build now
    depends directly upon Module::Metadata (which is an extraction of
    M::B::ModuleInfo intended for general reuse).  A pure-perl version has
    been bundled in inc/ solely for bootstrapping in case
    configure_requires is not supported. M::B::ModuleInfo remains as a
    wrapper around Module::Metadata.

  - Module::Build::YAML has been deprecated.  Module::Build now depends
    directly upon YAML::Tiny.  M::B::YAML remains as a subclass wrapper.
    The YAML_support feature has been removed, as YAML is now an ordinary
    dependency.

0.36_19 - Tue Dec  7 13:43:42 EST 2010

  Bug fixes:

  - Perl::OSType is declared as a 'configure_requires' dependency, but is
    also bundled in inc (and loaded if needed) [David Golden]

0.36_18 - Mon Dec  6 16:46:49 EST 2010

  Changes:

  - Added dependency on Perl::OSType to refactor and centralize
    management of OS type mapping [David Golden]

  - When parsing a version number out of a file, any trailing alphabetical
    characters will be dropped to avoid fatal errors when comparing version
    numbers.  These would have been dropped (with a warning) anyway during
    an ordinary numeric comparison. (RT#56071) [David Golden]

  Bug fixes:

  - A Perl interpreter mismatch between running Build.PL and running Build
    is now a fatal error, not a warning (RT#55183) [David Golden]

  - Bundled Module::Build::Version updated to bring into sync with CPAN
    version.pm 0.86 [David Golden]

  - No longer uses fake user 'foo' in t/tilde (RT#61793) [David Golden]

  - Won't fail tests if an ancient Tie::IxHash is installed
    [Christopher J. Madsen]

  - Correctly report missing metafile field names [David Golden]

  - Suppress uninitialized value errors during Pod creation
    on ActiveState Perl [David Golden]

  - Return to starting directory after install action; this is
    an attempt to fix an install.t heisenbug (RT#63003) [David Golden]

  - A broken version.pm load won't cause Module::Build::Version to
    die trying to install itself as a mock version (RT#59499)
    [Eric Wilhelm and David Golden]

  - PERL_DL_NONLAZY is now always set when tests are run
    (RT#56055) [Dmitry Karasik]

  - 'fakeinstall' will use .modulebuildrc actions for 'install' if
    no specific 'fakeinstall' options are provided (RT#57279)
    [David Golden]

  - Add install*script to search path for installdeps client
    and search site, then vendor, then core paths

  - Skip noexec tmpdir check on Windows (RT#55667) [Jan Dubois]

  - Arguments with key value pairs may now have keys with &quot;-&quot; in them
    (RT#53050) [David Golden]

  - Add quotemeta to t/tilde.t test to fix Cygwin fails
    [Chris Williams and David Golden]

  - Build script now checks that M::B is at least the same version
    of M::B as provided in 'configure_requires' in META
    (RT#54954) [David Golden]

0.36_17 - Wed Oct 27 18:08:36 EDT 2010

  Enhancements:

  - Added 'distinstall' action to run 'Build install' inside the
    generated distribution directory [Jeff Thalhammer]

0.36_16 - Thu Aug 26 12:44:07 EDT 2010

  Bug fixes:

  - Better error message in case package declaration is not found
    when searching for version. [Alexandr Ciornii]

  - Skips 'release_status' tests on perl &lt; 5.8.1 due to buggy
    treatment of dotted-decimal version numbers [David Golden]

0.36_15 - Wed Aug 25 10:41:28 EDT 2010

  Bug fixes:

  - Added a mock Software::License to prevent t/properties/license.t
    from failing.

0.36_14 - Sun Aug 22 22:56:50 EDT 2010

  Enhancements:

  - Adds 'release_status' and 'dist_suffix' properties in preparation
    for adding CPAN Meta Spec 2 support.  'dist_suffix' will be set
    to 'TRIAL' automatically when necessary. [David Golden]

  - Makes 'license' more liberal.  You can now specify either a license
    key from the approved list (c.f. Module::Build::API) or just a
    Software::License subclass name (e.g. 'Perl_5').  This should
    provide better support for custom or proprietary licenses.
    [David Golden]

0.36_13 - Wed Jul 28 22:40:25 EDT 2010

 Bug-fixes:

 - Bundled Module::Build::Version updated to bring into sync with CPAN
   version.pm 0.82 [David Golden]

0.36_12 - Tue Jul 27 00:08:51 EDT 2010

  Enhancements:

  - Module::Build::Compat will now convert dotted-decimal prereqs into
    decimal rather than dying (and will warn about this). [Apocalypse]

  Bug fixes:

  - Caches case-sensitivity checks to boost performance, fixes
    RT#55162 and RT#56513 [Reini Urban]

  - Won't try to use ActivePerl doc generation tools without confirming
    that they are indeed installed. [David Golden]

  - Sets temporary $ENV{HOME} in testing to an absolute path, which fixes
    some issues when tested as part of the Perl core [Nicholas Clark]

  - Module::Build::ModuleInfo now warns instead of dying when a module
    has an invalid version.  -&gt;version now just returns undef
    (RT#59593) [David Golden]

  Changes:

  - When authors do not specify Module::Build in configure_requires and
    Module::Build is automatically added, a warning will be issued
    showing the added prerequisite [David Golden]

  - Moved automatic configure_requires generation into get_metadata()
    and added an 'auto' argument to toggle it (on for META and off
    for MYMETA) [David Golden]

0.36_11 - Thu May 27 09:41:23 EDT 2010

  Bug fixes:

  - Handle META/MYMETA reading and writing within Module::Build to ensure
    utf8 mode on filehandles.  Now passes/gets only strings to YAML::Tiny
    or Module::Build::YAML

0.36_10 - Wed May 19 18:36:06 EDT 2010

  Bug fixes:

  - Fix failing t/manifypods.t on Windows from 0.36_09 changes [Klaus
    Eichner]

0.36_09 - Tue May 11 09:19:12 EDT 2010

  Bug fixes:

  - Improve HTML documentation generation on ActivePerl (RT#53478)
    [Scott Renner and Klaus Eichner]

0.36_08 - Mon Apr 26 08:00:15 EDT 2010

 Enhancements:

 - Give a list of valid licenses when given one we don't recognize
   (RT#55951) [Yanick Champoux]

 - Added 'Build manifest_skip' action to generate a default MANIFEST.SKIP
   [David Golden]

 Changes:

 - When temporarily generating a MANIFEST.SKIP when none exists, it will
   be removed on exit instead of hanging around until 'Build clean'.  This
   is less surprising/confusing and the 'Build manifest_skip' action
   is now available instead to bootstrap the file [David Golden]

 Bug fixes:

 - Fixed runtime error on cygwin when searching for an executable command
   during installdeps testing [David Golden]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1378/announcing-modulebuild-0-3800/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slouching towards Module::Build 0.38</title>
		<link>http://www.dagolden.com/index.php/1374/slouching-towards-modulebuild-0-38/</link>
		<comments>http://www.dagolden.com/index.php/1374/slouching-towards-modulebuild-0-38/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 03:07:34 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1374</guid>
		<description><![CDATA[I've just released the latest development release of Module::Build, version 0.37_06. You can install it from your favorite client as DAGOLDEN/Module-Build-0.37_06.tar.gz I am not aware of any more issues blocking the release of 0.38, so unless something new and serious comes up, I plan to release the next stable Module::Build around the end of the [...]]]></description>
			<content:encoded><![CDATA[<p>I've just released the latest development release of <a href="http://p3rl.org/Module::Build/">Module::Build</a>, version 0.37_06.  You can install it from your favorite client as <code>DAGOLDEN/Module-Build-0.37_06.tar.gz</code></p>
<p>I am not aware of any more issues blocking the release of 0.38, so unless something new and serious comes up, I plan to release the next stable Module::Build around the end of the week.</p>
<p>If you use Module::Build and have not tested your distributions with any of the 0.37_XX releases, please do so now as this may be your last chance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1374/slouching-towards-modulebuild-0-38/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CPAN.pm release candidate</title>
		<link>http://www.dagolden.com/index.php/1339/cpan-pm-release-candidate/</link>
		<comments>http://www.dagolden.com/index.php/1339/cpan-pm-release-candidate/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 05:06:02 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[cpan]]></category>
		<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1339</guid>
		<description><![CDATA[I recently uploaded CPAN version 1.94_65, which is the 15th development release since 1.9402 and represents almost 18 months of development work. Barring any show-stoppers, a stable release is expected in the next month. Meanwhile, 1.94_65 will be merged into the next Perl core development release and the stable version will be part of Perl [...]]]></description>
			<content:encoded><![CDATA[<p>I recently uploaded <a href="http://search.cpan.org/~dagolden/CPAN-1.94_65/">CPAN version 1.94_65</a>, which is the 15th development release since 1.9402 and represents almost 18 months of development work.  Barring any show-stoppers, a stable release is expected in the next month.  Meanwhile, 1.94_65 will be merged into the next Perl core development release and the stable version will be part of Perl 5.14 this spring.</p>
<p><strong>Please give it a try!</strong>  From the command line:</p>
<pre class="brush: plain; title: ; notranslate">
$ cpan DAGOLDEN/CPAN-1.94_65.tar.gz
</pre>
<p>Thank you to everyone contributing patches or commits (according to the git log): Andreas Koenig, David Golden, Frank Wiegand, Nick Patch, Robert Bohne, Tomas Doran, brian d foy and burak.  Thank you as well to anyone else who contributed to RT tickets or sent in patches outside git.</p>
<p>Here is a summary of major changes and bug fixes since 1.9402.</p>
<p><strong>New features</strong></p>
<ul>
<li>Major simplification of the FirstTime experience for new users, including auto-pick of CPAN mirrors</li>
<li>Added support for bootstrapping local::lib when the user does not have write access to perl's site library directories</li>
<li>Added support for and prerequisite on HTTP::Tiny for pure-perl HTTP bootstrapping</li>
<li>Added support for META/MYMETA.json files if CPAN::Meta is installed</li>
<li>Quieter user interface: made lots of '$module missing' type warnings only warn once; eliminated 'no YAML' warnings for distroprefs if there are no distroprefs.</li>
<li>Allows Foo/Bar.pm on the commandline to mean Foo::Bar</li>
<li>Allows calling make/test/install with regexp if unambiguous</li>
<li>bzip2 support should now be on par with gzip</li>
</ul>
<p><strong>New configuration options</strong></p>
<ul>
<li>added 'atexit' option for scan_cache</li>
<li>new config option prefer_external_tar (RT#64037)</li>
<li>new config variable version_timeout used in CPAN::Module::parse_version()</li>
</ul>
<p><strong>RT Tickets closed</strong></p>
<ul>
<li>RT #63357: use Dumpvalue when dumping potential crap</li>
<li>RT #62986: original config directories will be found even if File::HomeDir is later installed</li>
<li>RT #62064: build_requires_install_policy set to "no" did not work correctly</li>
<li>RT #61607: make the FTP download code more robust</li>
<li>RT #59216: make sure $builddir exists before calling tempdir</li>
<li>RT #57482 and RT #57788 revealed that configure_requires implicitly assumed build_requires instead of normal requires.</li>
<li>RT #55093: no_proxy doesn't work with more then one entries</li>
<li>RT #55091: don't ask the proxy credentials if proxy_user empty</li>
<li>RT #53305: amended lib/App/Cpan.pm because of a regression bugfix: Non-English locales got no diagnostics on a failed locking due to permissions</li>
<li>RT #51018: do not switch to default sites when we have a user-configured urllist</li>
<li>RT #48803: avoid 'unreached' if not following configure_requires bugfix: treat modules correctly that are deprecated in perl 5.12.  improved support for Perl core module deprecation</li>
<li>RT #47774: allow duplicate mention of modules in Makefile prelude</li>
<li>Fixed rt.perl.org#72362: CPAN ignoring configure_requires.  Also fixed (MY)META.yml processing to always prefer Parse::CPAN::Meta, if available.</li>
<li>Fixed rt.perl.org#72348: missing CPAN::HandleConfig::output;</li>
</ul>
<p><strong>Other bug fixes</strong></p>
<ul>
<li>Adds HOMEDRIVE/HOMEPATH or USERPROFILE as home directory options on Windows</li>
<li>Fixed several recent regressions related to external transport tools (ncftp, lynx, curl, etc)</li>
<li>Fixed quoting for downloading into directories containing whitespace</li>
<li>Solaris tar gets more handholding to avoid solaris tar errors</li>
<li>Portability fix: By-pass alarm() calls if we're running under perl 5.6.x &#038;& $OS is Windows.</li>
<li>Work around win32 URI::file volume bug</li>
<li>Prerequisites declared with the string "==" now supported</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1339/cpan-pm-release-candidate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Five Test::More features you might not be using yet</title>
		<link>http://www.dagolden.com/index.php/1322/five-testmore-features-you-might-not-be-using-yet/</link>
		<comments>http://www.dagolden.com/index.php/1322/five-testmore-features-you-might-not-be-using-yet/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 21:10:21 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1322</guid>
		<description><![CDATA[I've been using Test::More for so long that I sometimes forget about new features that have been added in the last couple years. If you're like me and would like a refresher, here's a list of five useful features that you might want to start using. Unless otherwise noted, you will need at least version [...]]]></description>
			<content:encoded><![CDATA[<p>I've been using <a href="http://p3rl.org/Test::More">Test::More</a> for so long that I sometimes forget about new features that have been added in the last couple years.  If you're like me and would like a refresher, here's a list of five useful features that you might want to start using.  Unless otherwise noted, you will need at least version 0.88 of Test::More.</p>
<h2>1. done_testing instead of no_plan</h2>
<p>If you don't know how many tests you are going to run (or don't want to keep count yourself), you used to have to specify 'no_plan' at the start of your tests.  That can lead to surprises if your tests exit prematurely.  Instead, put the <code>done_testing</code> function at the end of your tests.  This ensures that all tests actually run.</p>
<pre class="brush: perl; title: ; notranslate">
use strict; use warnings;
use Test::More 0.88;

ok(1, &quot;first test&quot;);
ok(1, &quot;second test&quot;);

done_testing;
</pre>
<h2>2. new_ok for object creation</h2>
<p>You used to have to create an object and then call <code>isa_ok</code> on it.  Now those two can be combined with <code>new_ok</code>.  It will also let you pass arguments in an arrayref to be used in the call to <code>new</code>.</p>
<pre class="brush: perl; title: ; notranslate">
use strict; use warnings;
use Test::More 0.88;

require Foo;
my $obj = new_ok(&quot;Foo&quot;);
# ... use $obj in testing ...

done_testing();
</pre>
<p><em>Changed "require_ok" to "require" per Ovid's comment, below.</em></p>
<h2>3. Add diagnostics only in verbose testing</h2>
<p>The old <code>diag</code> function always prints to stderr.  Particularly for debugging notes, that can clutter up the output when run under a harness.  You can now use the <code>note()</code> function to add diagnostics that are only seen in verbose output.</p>
<pre class="brush: perl; title: ; notranslate">
use strict; use warnings;
use Test::More 0.88;

note(&quot;Testing on perl $]&quot;);
ok(1, &quot;first test&quot;);

done_testing();
</pre>
<h2>4. Explain data structures in diagnostics</h2>
<p>I often find myself wanting to dump a data structure in diagnostics, and wind up loading Data::Dumper to do that.  Now Test::More can do that for you with the <code>explain()</code> function.  The output is a string that you can pass to <code>diag</code> or <code>note</code>.</p>
<pre class="brush: perl; title: ; notranslate">
use strict; use warnings;
use Test::More 0.88;

my $want = { pi =&gt; 3.14, e =&gt; 2.72, i =&gt; -1 };
my $have = get_data();

is_deeply($have, $want) or diag explain $have;

done_testing();
</pre>
<h2>5. Encapsulate related tests in a subtest (0.96)</h2>
<pre class="brush: perl; title: ; notranslate">
use strict; use warnings;
use Test::More 0.96;

pass(&quot;First test&quot;);

subtest 'An example subtest' =&gt; sub {
  pass(&quot;This is a subtest&quot;);
  pass(&quot;So is this&quot;);
};

pass(&quot;Third test&quot;);

done_testing();
</pre>
<p>Subtests can have their own plan, but if they don't have one, Test::More acts like there was an implicit <code>done_testing</code> at the end of the code reference.  That means you don't have to keep count of tests in a subtest and things still work safely.</p>
<p>You can use a 'skip_all' plan in a subtest, too, which is a useful way of constructing a SKIP block without having to count how many tests are being skipped the way you would with the <code>skip()</code> function.</p>
<pre class="brush: perl; title: ; notranslate">
use strict; use warnings;
use Test::More 0.96;

pass(&quot;First test&quot;);

subtest 'Like a SKIP block' =&gt; sub {
  plan 'skip_all' unless $required_condition;
  pass(&quot;This is a subtest&quot;);
  # ... many more tests that you don't have to count ...
};

pass(&quot;Third test&quot;);

done_testing();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1322/five-testmore-features-you-might-not-be-using-yet/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Coming soon in Perl: CPAN local::lib bootstrap</title>
		<link>http://www.dagolden.com/index.php/1245/coming-soon-in-perl-cpan-locallib-bootstrap/</link>
		<comments>http://www.dagolden.com/index.php/1245/coming-soon-in-perl-cpan-locallib-bootstrap/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 03:40:05 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[cpan]]></category>
		<category><![CDATA[p5p]]></category>
		<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1245</guid>
		<description><![CDATA[I've written about my efforts to get CPAN.pm to bootstrap local::lib and about a new HTTP client for CPAN.pm. I'm pleased to say that both have been merged into the development branch of the Perl core. Barring any show-stopping bugs, the forthcoming Perl 5.13.9 will let a non-privileged user bootstrap access to CPAN, even if [...]]]></description>
			<content:encoded><![CDATA[<p>I've written about my efforts to <a href="http://www.dagolden.com/index.php/1186/locallib-for-cpan-pm/">get CPAN.pm to bootstrap local::lib</a> and about a <a href="http://www.dagolden.com/index.php/1212/why-httptiny/">new HTTP client for CPAN.pm</a>.  I'm pleased to say that <strong>both have been merged into the development branch of the Perl core</strong>.</p>
<p>Barring any show-stopping bugs, the forthcoming Perl 5.13.9 will let a non-privileged user bootstrap access to CPAN, even if FTP is blocked and they have no command line HTTP clients installed.  That means that <strong>if you can run perl, and you can use port 80, then you can use CPAN</strong>.</p>
<p>Imagine someday when Perl 5.14 becomes standard in linux distributions.  Log-in to a new machine (or perhaps a shared host), type "cpan", and start installing stuff from CPAN.  Easy!</p>
<p>To show you how it works, I installed a snapshot of Perl from the git repository and then switched to a clean, unprivileged user account to try installing something.  All I typed at the keyboard was this:</p>
<pre class="brush: plain; title: ; notranslate">
/opt/perl/fromgit/bin/cpan5.13.8[ENTER]
[ENTER]
[ENTER]
[ENTER]
[ENTER]
install File::Marker[ENTER]
</pre>
<p>The log below is long and verbose (the way <a href="http://p3rl.org/CPAN">CPAN.pm</a> just is, unfortunately) but you can see how it uses <a href="http://p3rl.org/HTTP::Tiny">HTTP::Tiny</a>, bootstraps <a href="http://p3rl.org/local::lib">local::lib</a>, updates my <code>.bashrc</code>, installs File::Marker in the local library and even <strong>reminds me to restart my shell</strong>.  Isn't that user-friendly?</p>
<pre class="brush: plain; title: ; notranslate">
$ /opt/perl/fromgit/bin/cpan5.13.8 

CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the CPAN.pm module. If you want to use
CPAN.pm, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.

If you prefer to enter a dialog instead, you can answer 'no' to this
question and I'll let you configure in small steps one thing after the
other. (Note: you can revisit this dialog anytime later by typing 'o
conf init' at the cpan prompt.)

Would you like me to configure as much as possible automatically? [yes] 

 &lt;install_help&gt;

Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib] 

Autoconfigured everything but 'urllist'.

Now you need to choose your CPAN mirror sites.  You can let me
pick mirrors for you, you can select them from a list or you
can enter them by hand.

Would you like me to automatically choose some CPAN mirror
sites for you? (This means connecting to the Internet) [yes] 

Trying to fetch a mirror list from the Internet
Fetching with HTTP::Tiny:
http://www.perl.org/CPAN/MIRRORED.BY

Looking for CPAN mirrors near you (please be patient)
..............................................................
..............................................................
..............................................................
..................................... done!

New urllist
  http://cpan.erlbaum.net/
  http://cpan.mirror.clemson.edu/
  http://mirrors.servercentral.net/CPAN/

Autoconfiguration complete.

Attempting to bootstrap local::lib...

Writing /home/cleanroom/.cpan/CPAN/MyConfig.pm for bootstrap...
commit: wrote '/home/cleanroom/.cpan/CPAN/MyConfig.pm'
Fetching with HTTP::Tiny:
http://cpan.erlbaum.net/authors/01mailrc.txt.gz
Going to read '/home/cleanroom/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with HTTP::Tiny:
http://cpan.erlbaum.net/modules/02packages.details.txt.gz
Going to read '/home/cleanroom/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Sat, 15 Jan 2011 20:57:19 GMT
  HTTP::Date not available
............................................................................DONE
Fetching with HTTP::Tiny:
http://cpan.erlbaum.net/modules/03modlist.data.gz
Going to read '/home/cleanroom/.cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Going to write /home/cleanroom/.cpan/Metadata
Running make for A/AP/APEIRON/local-lib-1.008001.tar.gz
Fetching with HTTP::Tiny:
http://cpan.erlbaum.net/authors/id/A/AP/APEIRON/local-lib-1.008001.tar.gz
Fetching with HTTP::Tiny:
http://cpan.erlbaum.net/authors/id/A/AP/APEIRON/CHECKSUMS
Checksum for /home/cleanroom/.cpan/sources/authors/id/A/AP/APEIRON/local-lib-1.008001.tar.gz ok

  CPAN.pm: Going to build A/AP/APEIRON/local-lib-1.008001.tar.gz

Attempting to create directory /home/cleanroom/perl5

*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
*** Since we're running under CPAN, I'll just let it take care
    of the dependency's installation later.
[Core Features]
- ExtUtils::MakeMaker ...loaded. (6.57_05 &gt;= 6.31)
- ExtUtils::Install   ...loaded. (1.55 &gt;= 1.43)
- Module::Build       ...loaded. (0.3607 &gt;= 0.36)
- CPAN                ...loaded. (1.9463 &gt;= 1.82)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Writing Makefile for local::lib
Writing MYMETA.yml
cp lib/POD2/PT_BR/local/lib.pod blib/lib/POD2/PT_BR/local/lib.pod
cp lib/lib/core/only.pm blib/lib/lib/core/only.pm
cp lib/local/lib.pm blib/lib/local/lib.pm
cp lib/POD2/DE/local/lib.pod blib/lib/POD2/DE/local/lib.pod
Manifying blib/man3/POD2::PT_BR::local::lib.3
Manifying blib/man3/lib::core::only.3
Manifying blib/man3/local::lib.3
Manifying blib/man3/POD2::DE::local::lib.3
  APEIRON/local-lib-1.008001.tar.gz
  /usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /opt/perl/fromgit/bin/perl5.13.8 -I/home/cleanroom/perl5/lib/perl5/x86_64-linux-thread-multi -I/home/cleanroom/perl5/lib/perl5 &quot;-MExtUtils::Command::MM&quot; &quot;-e&quot; &quot;test_harness(0, 'inc', 'blib/lib', 'blib/arch')&quot; t/classmethod.t t/coderefs_in_inc.t t/de-dup.t t/install.t t/lib-core-only.t t/pipeline.t
t/classmethod.t ...... Name &quot;File::Spec::rel2abs&quot; used only once: possible typo at t/classmethod.t line 20.
t/classmethod.t ...... 1/? Attempting to create directory t/var/splat
t/classmethod.t ...... ok
t/coderefs_in_inc.t .. ok
t/de-dup.t ........... ok
t/install.t .......... skipped: Install Capture::Tiny to test installation
t/lib-core-only.t .... ok
t/pipeline.t ......... ok
All tests successful.
Files=6, Tests=10,  1 wallclock secs ( 0.04 usr  0.01 sys +  0.19 cusr  0.01 csys =  0.25 CPU)
Result: PASS
  APEIRON/local-lib-1.008001.tar.gz
  /usr/bin/make test -- OK
Running make install
Manifying blib/man3/POD2::PT_BR::local::lib.3
Manifying blib/man3/lib::core::only.3
Manifying blib/man3/local::lib.3
Manifying blib/man3/POD2::DE::local::lib.3
Installing /home/cleanroom/perl5/lib/perl5/local/lib.pm
Installing /home/cleanroom/perl5/lib/perl5/POD2/PT_BR/local/lib.pod
Installing /home/cleanroom/perl5/lib/perl5/POD2/DE/local/lib.pod
Installing /home/cleanroom/perl5/lib/perl5/lib/core/only.pm
Installing /home/cleanroom/perl5/man/man3/POD2::PT_BR::local::lib.3
Installing /home/cleanroom/perl5/man/man3/lib::core::only.3
Installing /home/cleanroom/perl5/man/man3/local::lib.3
Installing /home/cleanroom/perl5/man/man3/POD2::DE::local::lib.3
Appending installation info to /home/cleanroom/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
  APEIRON/local-lib-1.008001.tar.gz
  /usr/bin/make install  -- OK

local::lib is installed. You must now add the following environment variables
to your shell configuration files (or registry, if you are on Windows) and
then restart your command line shell and CPAN before installing modules:

export PERL_LOCAL_LIB_ROOT=&quot;/home/cleanroom/perl5&quot;
export PERL_MB_OPT=&quot;--install_base /home/cleanroom/perl5&quot;
export PERL_MM_OPT=&quot;INSTALL_BASE=/home/cleanroom/perl5&quot;
export PERL5LIB=&quot;/home/cleanroom/perl5/lib/perl5/x86_64-linux-thread-multi:/home/cleanroom/perl5/lib/perl5:$PERL5LIB&quot;
export PATH=&quot;/home/cleanroom/perl5/bin:$PATH&quot;

Would you like me to append that to /home/cleanroom/.bashrc now? [yes] 

commit: wrote '/home/cleanroom/.cpan/CPAN/MyConfig.pm'
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9463)
Enter 'h' for help.

cpan[1]&gt; install File::Marker
Running install for module 'File::Marker'
Running make for D/DA/DAGOLDEN/File-Marker-0.13.tar.gz
Fetching with HTTP::Tiny:
http://cpan.erlbaum.net/authors/id/D/DA/DAGOLDEN/File-Marker-0.13.tar.gz
Fetching with HTTP::Tiny:
http://cpan.erlbaum.net/authors/id/D/DA/DAGOLDEN/CHECKSUMS
Checksum for /home/cleanroom/.cpan/sources/authors/id/D/DA/DAGOLDEN/File-Marker-0.13.tar.gz ok

  CPAN.pm: Going to build D/DA/DAGOLDEN/File-Marker-0.13.tar.gz

Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'File-Marker' version '0.13'
Building File-Marker
  DAGOLDEN/File-Marker-0.13.tar.gz
  ./Build -- OK
Running Build test
t/01_File_Marker.t ... ok
t/02_fork.t .......... ok
t/03_thread.t ........ ok
t/04_save_load.t ..... ok
t/98_pod.t ........... skipped: Skipping author tests
t/99_pod_coverage.t .. skipped: Skipping author tests
All tests successful.
Files=6, Tests=58,  1 wallclock secs ( 0.04 usr  0.02 sys +  0.22 cusr  0.02 csys =  0.30 CPU)
Result: PASS
  DAGOLDEN/File-Marker-0.13.tar.gz
  ./Build test -- OK
Running Build install
Building File-Marker
Installing /home/cleanroom/perl5/lib/perl5/File/Marker.pm
Installing /home/cleanroom/perl5/man/man3/File::Marker.3
  DAGOLDEN/File-Marker-0.13.tar.gz
  ./Build install  -- OK

cpan[2]&gt; q
Terminal does not support GetHistory.
Lockfile removed.

*** Remember to restart your shell before running cpan again ***
</pre>
<p>I want to thank Andreas Koenig (CPAN.pm) and Chris Nehren (local::lib) for quickly turning around new releases of their modules to make this work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1245/coming-soon-in-perl-cpan-locallib-bootstrap/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Upgrading File::HomeDir might lose your config files</title>
		<link>http://www.dagolden.com/index.php/1238/upgrading-filehomedir-might-lose-your-config-files/</link>
		<comments>http://www.dagolden.com/index.php/1238/upgrading-filehomedir-might-lose-your-config-files/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 00:01:34 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1238</guid>
		<description><![CDATA[If you use File::HomeDir, or anything on CPAN that depends on File::HomeDir, you should be aware of a change in behavior in version 0.91 that might create problems. Specifically, 0.91 is the first production release that adds support for FreeDesktop.org standards for data, config, cache, etc. directories. Here's an example of how your config file [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="http://p3rl.org/File::HomeDir">File::HomeDir</a>, or anything on CPAN that <a href="http://deps.cpantesters.org/depended-on-by.pl?dist=File-HomeDir-0.93">depends on File::HomeDir</a>, you should be aware of a change in behavior in version 0.91 that might create problems.</p>
<p>Specifically, 0.91 is the first production release that adds support for <a href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">FreeDesktop.org standards</a> for data, config, cache, etc. directories.</p>
<p>Here's an example of how your config file locations might change by upgrading:</p>
<pre class="brush: plain; title: ; notranslate">
$ cpanm -q ADAMK/File-HomeDir-0.89.tar.gz
$ perl -MFile::HomeDir -E 'say File::HomeDir-&gt;my_data'
/home/david

$ cpanm -q ADAMK/File-HomeDir-0.91.tar.gz
$ perl -MFile::HomeDir -E 'say File::HomeDir-&gt;my_data'
/home/david/.local/share
</pre>
<p>So if you upgrade File::HomeDir and your config files aren't found, that might be the problem.  (If you only use <code>File::HomeDir->my_home</code>, you should be OK.)</p>
<p>As a developer, you should think long and hard whether and how you want to use File::HomeDir.  On the one hand, it helps you put things in "correct" locations on different operating systems.  On the other hand, the definition of "correct" has changed over time.  It is supposed to be more stable now, but you have no guarantees.</p>
<p>For projects that already use File::HomeDir, to avoid inconveniencing users with older versions of it, you probably need to add some logic for different versions of File::HomeDir, possibly replicating code in older releases of File::HomeDir so you can find old config files or data.  You might also want to bump your File::HomeDir minimum version prerequisite soon and get users past the pain quickly.</p>
<p>For new projects, just make sure your minimum File::HomeDir prerequisite is at least 0.91 and hope that you don't have to add version-specific code in the future.  Or you could limit yourself to just <code>File::HomeDir->my_home</code>, which has been pretty stable, and ignore the content-specific directories, but that sort of defeats the whole purpose of using File::HomeDir in the first place.</p>
<p>If you're starting from scratch (or if you decide to force users to upgrade and swallow the pain), you should be aware of the new <code>my_dist_config</code> and <code>my_dist_data</code> methods added in File::HomeDir 0.93: </p>
<pre class="brush: plain; title: ; notranslate">
$ cpanm -q ADAMK/File-HomeDir-0.93.tar.gz

$ perl -MFile::HomeDir -wE 'say File::HomeDir-&gt;my_dist_config(&quot;Foo-Bar&quot;, {create =&gt; 1})'
/home/david/.config/Perl/Foo-Bar

$ perl -MFile::HomeDir -wE 'say File::HomeDir-&gt;my_dist_data(&quot;Foo-Bar&quot;, {create =&gt; 1})'
/home/david/.local/share/Perl/dist/Foo-Bar
</pre>
<p>That buries everything a little further down under a "Perl" or "Perl/dist" directory, but saves you the extra work of assembling a path under <code>my_config</code> or <code>my_data</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1238/upgrading-filehomedir-might-lose-your-config-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why HTTP::Tiny?</title>
		<link>http://www.dagolden.com/index.php/1212/why-httptiny/</link>
		<comments>http://www.dagolden.com/index.php/1212/why-httptiny/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 01:14:01 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[cpan]]></category>
		<category><![CDATA[perl programming]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1212</guid>
		<description><![CDATA[I've recently been collaborating with Christian Hansen on HTTP::Tiny, a minimalist, HTTP/1.1 client library for Perl. For basic web client tasks like grabbing a single page or mirroring a file, it does the job in a fraction of the code that would be needed to install LWP::UserAgent. Because it has no non-core dependencies, it is [...]]]></description>
			<content:encoded><![CDATA[<p>I've recently been collaborating with Christian Hansen on <a href="http://p3rl.org/HTTP::Tiny">HTTP::Tiny</a>, a minimalist, HTTP/1.1 client library for Perl.  For basic web client tasks like grabbing a single page or mirroring a file, it does the job in a fraction of the code that would be needed to install <a href="http://p3rl.org/LWP::UserAgent">LWP::UserAgent</a>.  Because it has no non-core dependencies, it is ideal for what I need to get CPAN.pm to bootstrap itself with pure Perl.</p>
<p>Here's a quick look at how you would use it for the two common tasks I mentioned:</p>
<pre class="brush: perl; title: ; notranslate">
    use HTTP::Tiny;
    my $http = HTTP::Tiny-&gt;new;
    my $response;

    # get a single page
    $response = $http-&gt;get('http://example.com/');
    die &quot;Failed!\n&quot; unless $response-&gt;{success};
    print $response-&gt;{content};

    # mirror a file
    $response = $http-&gt;mirror('http://example.com/file.tar.gz', 'file.tar.gz');
    die &quot;Failed!\n&quot; unless $response-&gt;{success};
    print &quot;Unchanged!\n&quot; if $reponse-&gt;{status} eq '304';
</pre>
<p>The example above is almost the same as you'd get using LWP::UserAgent with one big exception.  HTTP::Tiny returns the response as a hash reference rather than as an object.  Just like LWP::UserAgent, the mirror method will send an <code>If-Modified-Since</code> header for an existing file to skip downloading if the file is unchanged.  HTTP::Tiny doesn't (yet) handle query parameters -- you have to prepare those yourself, but for simple downloads, you don't generally need those anyway.</p>
<p>Where did HTTP::Tiny come from? When I was working on getting CPAN.pm to <a href="http://www.dagolden.com/index.php/1148/bootstrapping-cpan-pm-using-httplite/">support a pure-Perl HTTP bootstrap</a>, I started with <a href="http://p3rl.org/HTTP::Lite">HTTP::Lite</a>.  When I discussed it on #p5p, Christian Hansen pointed out a number of serious shortcomings and decided that it would be easier for him to write a new, lightweight HTTP/1.1 client from scratch rather than try to redo the plumbing in HTTP::Lite.  </p>
<p>The result is HTTP::Tiny and I've been collaborating with Christian to get it ready for use by CPAN.pm and ready for the Perl core.  Unlike HTTP::Lite, HTTP::Tiny is a conditionally conforming HTTP/1.1 client.  It supports both redirection and mirroring, which HTTP::Lite does not, both of which are important features for a CPAN client.</p>
<p>As a "Tiny" module, HTTP::Tiny achieves its HTTP/1.1 conformance in a just a fraction the code required for LWP::UserAgent and its non-core dependents.  Don't get me wrong -- LWP::UserAgent is a great piece of software.  But sometimes -- like for the Perl core or for a <a href="http://p3rl.org/App::FatPacker">fatpacked</a> application --  something much smaller and simpler will do just as well.</p>
<p>Let's see what a difference there is.  <a href="http://deps.cpantesters.org/">CPANdeps</a> shows us all of LWP::UserAgent's <a href="http://deps.cpantesters.org/?module=LWP%3A%3AUserAgent&#038;perl=5.10.1&#038;os=any+OS">dependencies</a> and highlights the ones that are non-core (as of Perl 5.10.1):</p>
<ul>
<li><a href="http://p3rl.org/URI">URI</a></li>
<li><a href="http://p3rl.org/HTML::Parser">HTML::Parser</a></li>
<li><a href="http://p3rl.org/HTML::Tagset">HTML::Tagset</a></li>
</ul>
<p>I used David A. Wheeler's <a href="http://www.dwheeler.com/sloccount/">SLOCCOUNT</a> to count lines of code in each of the distributions containing these modules as well as for HTTP::Lite and HTTP::Tiny (based on the "soon-to-be" 0.007 release).  In all cases, I excluded files in t/ and examples directories.  (Lines of Perl includes any programs distributed with the distribution.)</p>
<p>Here are the results:</p>
<pre class="brush: plain; title: ; notranslate">
Distribution        .pm files Lines (Perl) Lines (C)  Total Lines
-----------------   --------- ------------ ----------  -----------
libwww-perl-5.837       52        10258          0       10258
HTML-Parser-3.68         7          883       1972        2855
HTML-Tagset-3.20         1          139          0         139
URI-1.56                52         2715          0        2715
                     -----        -----      -----       -----
TOTAL LWP &amp; friends    112        13995       1972       15967

versus

Distribution        .pm files Lines (Perl) Lines (C)  Total Lines
-----------------   --------- ------------ ----------  -----------
HTTP-Lite-2.3            1          634          0         634
HTTP-Tiny-0.007          1          603          0         603
</pre>
<p>Wow!  Both HTTP::Lite and HTTP::Tiny accomplish simple HTTP tasks with <strong>less than 4%</strong> of the SLOC of LWP and its non-core dependencies.</p>
<p>What about memory usage?  Here's the "null" case that shows memory usage of just loading the three client modules:</p>
<pre class="brush: plain; title: ; notranslate">
  VSZ   RSS COMMAND
30440  5512 perl -MLWP::UserAgent -e 1 while 1
26700  3960 perl -MHTTP::Tiny -e 1 while 1
26040  3168 perl -MHTTP::Lite -e 1 while 1
</pre>
<p>HTTP::Lite is smallest, but it also doesn't have the features or conformance I need.</p>
<p>That's not much of a real-world test, so let's try something else -- downloading the 950K CPAN 02packages.details.txt.gz file.  Here is the test code for HTTP::Tiny and LWP::UserAgent side by side:</p>
<pre class="brush: perl; title: ; notranslate">
# http-tiny-mirror.pl                  # lwp-useragent-mirror.pl
#!/usr/bin/env perl                    #!/usr/bin/env perl
use strict;                            use strict;
use warnings;                          use warnings;
use HTTP::Tiny;                        use LWP::UserAgent;                                 

my ($url, $file) = @ARGV;              my ($url, $file) = @ARGV;
die unless $url &amp; $file;               die unless $url &amp; $file;                            

my $http = HTTP::Tiny-&gt;new;            my $http = LWP::UserAgent-&gt;new;
my $res = $http-&gt;mirror($url, $file);  my $res = $http-&gt;mirror($url, $file);
die &quot;Failed!\n&quot;                        die &quot;Failed!\n&quot;
  unless $res-&gt;{success};                unless $res-&gt;is_success;                          

1 while 1;                             1 while 1;
</pre>
<p>What about HTTP::Lite?  It doesn't have a <code>mirror</code> method and doesn't do redirection, which I get for free with HTTP::Tiny and LWP::UserAgent.  I'd have to write dozens of lines of code to emulate that for a "fair" test, so I skipped it.</p>
<p>Let's add those two programs (after downloading the 02packages file to files with different names) to our memory benchmarks:</p>
<pre class="brush: plain; title: ; notranslate">
  VSZ   RSS COMMAND
50916  9824 perl ./lwp-useragent-mirror.pl [...]
35376  4348 perl ./http-tiny-mirror.pl [...]
30440  5512 perl -MLWP::UserAgent -e 1 while 1
26700  3960 perl -MHTTP::Tiny -e 1 while 1
26040  3168 perl -MHTTP::Lite -e 1 while 1
</pre>
<p>HTTP::Tiny wins -- not by a huge amount in absolute terms, admittedly, but if you don't need the extra features that LWP::UserAgent offers, HTTP::Tiny might just be all you need.</p>
<p>Thank you, Christian, for <a href="http://p3rl.org/HTTP::Tiny">HTTP::Tiny</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1212/why-httptiny/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Quick update: getting bleadperl ready for META.json</title>
		<link>http://www.dagolden.com/index.php/1206/quick-update-getting-bleadperl-ready-for-meta-json/</link>
		<comments>http://www.dagolden.com/index.php/1206/quick-update-getting-bleadperl-ready-for-meta-json/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 04:05:42 +0000</pubDate>
		<dc:creator>dagolden</dc:creator>
				<category><![CDATA[cpan-meta-spec]]></category>
		<category><![CDATA[p5p]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ironman]]></category>
		<category><![CDATA[perl programming]]></category>

		<guid isPermaLink="false">http://www.dagolden.com/?p=1206</guid>
		<description><![CDATA[The latest development releases of Parse::CPAN::Meta now support both META.yml and META.json files. By default, it uses JSON::PP for the META.json files. Accordingly, JSON::PP has just been added to the Perl core. (Thank you to Makamaka for his work getting JSON::PP ready for bleadperl.) There's more work on the horizon, but I expect to get [...]]]></description>
			<content:encoded><![CDATA[<p>The latest development releases of <a href="http://search.cpan.org/~dagolden/Parse-CPAN-Meta-1.41_04/">Parse::CPAN::Meta</a> now support both META.yml and META.json files.  By default, it uses <a href="http://p3rl.org/JSON::PP">JSON::PP</a> for the META.json files.  Accordingly, JSON::PP has just been added to the Perl core.  (Thank you to Makamaka for his work getting JSON::PP ready for bleadperl.)</p>
<p>There's more work on the horizon, but I expect to get full support for the version 2 <a href="http://p3rl.org/CPAN::Meta::Spec">CPAN::Meta::Spec</a> into Perl 5.14 before I'm done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagolden.com/index.php/1206/quick-update-getting-bleadperl-ready-for-meta-json/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

