<?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>logicLAB.org &#187; WWW::Mechanize::Cached</title>
	<atom:link href="http://logiclab.org/wordpress/tag/wwwmechanizecached/feed/" rel="self" type="application/rss+xml" />
	<link>http://logiclab.org/wordpress</link>
	<description>logicLAB Open Source Activities and Projects</description>
	<lastBuildDate>Wed, 14 Mar 2012 10:46:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CPAN Release WWW::DanDomain 0.02, now with caching of retrieved data</title>
		<link>http://logiclab.org/wordpress/2009/08/20/cpan-release-wwwdandomain-002-now-with-caching-of-retrieved-data/</link>
		<comments>http://logiclab.org/wordpress/2009/08/20/cpan-release-wwwdandomain-002-now-with-caching-of-retrieved-data/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 20:33:06 +0000</pubDate>
		<dc:creator>jonasbn</dc:creator>
				<category><![CDATA[Releases]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[Test::Prereq]]></category>
		<category><![CDATA[WWW::DanDomain]]></category>
		<category><![CDATA[WWW::Mechanize]]></category>
		<category><![CDATA[WWW::Mechanize::Cached]]></category>

		<guid isPermaLink="false">http://logiclab.org/wordpress/2009/08/20/cpan-release-wwwdandomain-002-now-with-caching-of-retrieved-data/</guid>
		<description><![CDATA[The latest release of WWW::DanDomain has just been uploaded to PAUSE. The release is a feature release and the main improvement is caching. As described earlier, when announcing the release of version 0.01, the module is used to handle a lot of data streams and some of them even rely on the same foundation. So [...]]]></description>
			<content:encoded><![CDATA[<p>The latest release of <a href="http://search.cpan.org/~jonasbn/WWW-DanDomain/">WWW::DanDomain</a> has just been uploaded to PAUSE. The release is a feature release and the main improvement is caching.</p>
<p>As described earlier, when announcing the release of version 0.01, the module is used to handle a lot of data streams and some of them even rely on the same foundation. So caching seemed like a sane idea instead of building a multiplexer, which would fetch the data and then process the data for the different targets. The latter in general a sane solution, but implementing caching was both easy and seemed like good first shot at a solution.</p>
<p>The lucky thing was really that <a href="http://search.cpan.org/~petdance/WWW-Mechanize/">WWW::Mechanize</a> the core module we use in <a href="http://search.cpan.org/~jonasbn/WWW-DanDomain/">WWW::DanDomain</a> has a cousin <a href="http://search.cpan.org/~oalders/WWW-Mechanize-Cached/">WWW::Mechanize::Cached</a>, which implements the same interface and therefor was easy to plug in.</p>
<p>In addition to the caching, the distribution now utilized Test::Prereq as part of its test suite. Unfortunately I again released a distribution (version 0.01), which did not have all requirements specified properly. This can be see from the smoke tests. Please see the blog entry on the same topic for another distribution for a more thorough explanation, there is no need to repeat it here.</p>
<p>I would much rather raise the attention to brian d foy’s <a href="http://search.cpan.org/~bdfoy/Test-Prereq/">Test::Prereq</a>. This marvelous module actually assists me in not making this mistake again. So release 0.02 of <a href="http://search.cpan.org/~jonasbn/WWW-DanDomain/">WWW::DanDomain</a> now contains a test, which check all requirements listed in the source code.</p>
<p>The only problem I have with <a href="http://search.cpan.org/~bdfoy/Test-Prereq/">Test::Prereq</a> is its speed. It is quite slow, which btw. it quite understandable if you consider what it does. So instead of using it as part of the normal test suite, which I try to run as frequently as possible when developing, I classified the test as an author test.</p>
<p>The author test concept is using for special tests, which are used by CPAN contributors. The normal things is simply to let a some of the tests be controlled by an environment variable namely TEST_AUTHOR.</p>
<p>These tests only make sense to run for the author. So smoke testers and end-users do not need to run these, since the remaining test suites and build tools will make sure that the requirements are met or at least tested.</p>
<p>I sent a patch to brian d foy, via <a href="http://github.com/briandfoy/test-prereq/tree/master">Github, where Test::Prereq</a> is hosted and it was applied. But for those of you who cannot wait for brian d foy’s next release I will visualize my little contribution right here.</p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax1"></a><a style="wp-synhighlighter-title" href="#codesyntax1"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="perl" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># http://search.cpan.org/~bdfoy/Test-Prereq/lib/Build.pm</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># $Id: prerequisites.t 6328 2009-08-16 11:51:16Z jonasbn $</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">use</span> Test<span style="color: #339933;">::</span><span style="color: #006600;">More</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a href="http://perldoc.perl.org/functions/eval.html"><span style="color: #000066;">eval</span></a> “<span style="color: #000000; font-weight: bold;">use</span> Test<span style="color: #339933;">::</span><span style="color: #006600;">Prereq</span><span style="color: #339933;">::</span><span style="color: #006600;">Build</span>”<span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$msg</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$@</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">$msg</span> <span style="color: #339933;">=</span> ‘Test<span style="color: #339933;">::</span><span style="color: #006600;">Prereq</span><span style="color: #339933;">::</span><span style="color: #006600;">Build</span> required to test dependencies’<span style="color: #339933;">;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #0000ff;">$ENV</span><span style="color: #009900;">&#123;</span>TEST_AUTHOR<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0000ff;">$msg</span> <span style="color: #339933;">=</span> ‘Author test.  Set <span style="color: #0000ff;">$ENV</span><span style="color: #009900;">&#123;</span>TEST_AUTHOR<span style="color: #009900;">&#125;</span> to a true value to run.’<span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">plan skip_all <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$msg</span> <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">$msg</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">prereq_ok<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li></ol></pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://logiclab.org/wordpress/2009/08/20/cpan-release-wwwdandomain-002-now-with-caching-of-retrieved-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

