<?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>Dereferenced.com &#187; module-monday</title>
	<atom:link href="http://www.dereferenced.com/tags/module-monday/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dereferenced.com</link>
	<description>A preponderance of Perl, an excess of XML, and additional alliterations.</description>
	<lastBuildDate>Sun, 29 Aug 2010 23:16:38 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Perl Module Monday: Data::Section</title>
		<link>http://www.dereferenced.com/2009/12/28/perl-module-monday-datasection/</link>
		<comments>http://www.dereferenced.com/2009/12/28/perl-module-monday-datasection/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 06:24:14 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=115</guid>
		<description><![CDATA[For this week, I&#8217;m turning the first of several modules I was introduced to by reading RJBS&#8217; Advent Calendar. This module scratches a particular itch that I&#8217;ve had on several occasions, including fairly recently.
Data::Section, in simple terms, turns your __DATA__ section into a hash-table of strings keyed by indexes you choose. It gives you a [...]]]></description>
			<content:encoded><![CDATA[<p>For this week, I&#8217;m turning the first of several modules I was introduced to by reading RJBS&#8217; <a href="http://advent.rjbs.manxome.org/index.html">Advent Calendar</a>. This module scratches a particular itch that I&#8217;ve had on several occasions, including fairly recently.</p>
<p><a href="http://search.cpan.org/dist/Data-Section/">Data::Section</a>, in simple terms, turns your <code>__DATA__</code> section into a hash-table of strings keyed by indexes you choose. It gives you a clean, programmatic way of having multiple &#8220;mini-data&#8221; sections within the main one, in a fashion similar to <a href="http://search.cpan.org/dist/Inline-Files/">Inline::Files</a> (but without the niggling caveat that it <a href="http://search.cpan.org/dist/Inline-Files/lib/Inline/Files.pm#Safety_first">could overwrite your source files</a>). The author notes that it was originally envisioned as a way for modules to store their own (multiple) templates, which is a task I&#8217;ve had to deal with before. But it would be useful anywhere you want to store large chunks of text data, without resorting to here-documents. It also allows for inheritance of data from a module&#8217;s super-classes that also use Data::Section, allowing a class to re-use existing data and only &#8220;declare&#8221; the extra sections it needs, or those sections that need to be different. You can learn more at the <a href="http://advent.rjbs.manxome.org/2009-12-09.html">advent entry</a> for this module.</p>
<p>I already have a small CGI app that will be getting the Data::Section treatment, and I hope it can be useful to you as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/12/28/perl-module-monday-datasection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No PMM Post This Week</title>
		<link>http://www.dereferenced.com/2009/12/21/no-pmm-post-this-week/</link>
		<comments>http://www.dereferenced.com/2009/12/21/no-pmm-post-this-week/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 02:16:01 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=113</guid>
		<description><![CDATA[There will be no Perl Module Monday this week, as I&#8217;m on vacation for the holidays and haven&#8217;t had the time to research and select a module this week&#8230;
]]></description>
			<content:encoded><![CDATA[<p>There will be no Perl Module Monday this week, as I&#8217;m on vacation for the holidays and haven&#8217;t had the time to research and select a module this week&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/12/21/no-pmm-post-this-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl Module Monday: Linux::Inotify2</title>
		<link>http://www.dereferenced.com/2009/12/14/perl-module-monday-linuxinotify2/</link>
		<comments>http://www.dereferenced.com/2009/12/14/perl-module-monday-linuxinotify2/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 07:43:20 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=111</guid>
		<description><![CDATA[Here&#8217;s another short one this week&#8230;
I first learned about Linux::Inotify2 from a posting on acme&#8217;s blog. It&#8217;s a neat interface to the Linux Inotify system, which itself is basically a way of being informed whenever things happen in the file-system.
I was able to make use of this almost immediately&#8211; I took the sample script from [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another short one this week&#8230;</p>
<p>I first learned about <a href="http://search.cpan.org/dist/Linux-Inotify2/">Linux::Inotify2</a> from a <a href="http://acme.vox.com/library/post/what-files-does-your-perl-load.html">posting on acme&#8217;s blog</a>. It&#8217;s a neat interface to the Linux <a href="http://en.wikipedia.org/wiki/Inotify">Inotify</a> system, which itself is basically a way of being informed whenever things happen in the file-system.</p>
<p>I was able to make use of this almost immediately&#8211; I took the sample script from acme&#8217;s post and made a few adjustments, then used it to look at the libraries that <a href="http://search.cpan.org/dist/Image-Size/">Image::Size</a> loads during start-up. Turns out that there were a couple of them that didn&#8217;t need to be loaded until/unless needed, and once I saw this I was able to move them around and speed up the compile-time phase of the module.</p>
<p>This module has some great potential for monitoring, measuring, etc. I&#8217;m toying with a graphical version of acme&#8217;s script that I can have running during test suite runs, to get a better idea of other places I can improve things.</p>
<p>Check out the module, and check out acme&#8217;s original post on the subject, too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/12/14/perl-module-monday-linuxinotify2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Perl Module Monday: File::Tail</title>
		<link>http://www.dereferenced.com/2009/12/07/perl-module-monday-filetail/</link>
		<comments>http://www.dereferenced.com/2009/12/07/perl-module-monday-filetail/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 05:27:48 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=98</guid>
		<description><![CDATA[Today, a short one as I&#8217;m short on time. But I wasn&#8217;t able to do a PMM last week, and I&#8217;d hate to skip it two weeks in a row, so&#8230;
Say hello to File::Tail. A simple concept, but a very, very useful one.  Ever run the *NIX &#8220;tail -f &#60;file&#62;&#8221; command? Yeah, it&#8217;s pretty much just like [...]]]></description>
			<content:encoded><![CDATA[<p>Today, a short one as I&#8217;m short on time. But I wasn&#8217;t able to do a PMM last week, and I&#8217;d hate to skip it two weeks in a row, so&#8230;</p>
<p>Say hello to <a href="http://search.cpan.org/dist/File-Tail/">File::Tail</a>. A simple concept, but a very, very useful one.  Ever run the *NIX &#8220;<tt>tail -f &lt;file&gt;</tt>&#8221; command? Yeah, it&#8217;s pretty much just like that. Only in Perl, so it&#8217;s actually more flexible. Much more.</p>
<p>You can use it in a very simple manner, to read from files that are continuously updating. You can control how often and to what degree it adjusts the wait-interval it uses when polling the underlying file to check for changes. You can also tie a file-handle to it. You can do things like <tt>select</tt>-polling across several such handles or objects, to read in a non-blocking way from multiple tail&#8217;d files at once. It even comes bundled with two sample scripts showing it in action.</p>
<p>Check it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/12/07/perl-module-monday-filetail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Perl Module Monday: Chart::Clicker</title>
		<link>http://www.dereferenced.com/2009/11/23/perl-module-monday-chartclicker/</link>
		<comments>http://www.dereferenced.com/2009/11/23/perl-module-monday-chartclicker/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 23:25:55 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=89</guid>
		<description><![CDATA[I&#8217;ve been interested in the Chart::Clicker package for a while, and today it came up in a series of Twitter messages in my #perl search. So that seemed like a sign that it would be a good pick for this week&#8217;s feature.
Chart::Clicker is a mature, very feature-rich charting package that comes with a cookbook and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been interested in the <a href="http://search.cpan.org/dist/Chart-Clicker">Chart::Clicker</a> package for a while, and today it came up in a series of Twitter messages in my <a href="http://twitter.com/#search?q=%23perl">#perl</a> search. So that seemed like a sign that it would be a good pick for this week&#8217;s feature.</p>
<p>Chart::Clicker is a mature, very feature-rich charting package that comes with a <a href="http://www.onemogin.com/clicker/cookbook/">cookbook</a> and many <a href="http://www.onemogin.com/clicker/examples/">examples</a> (the <a href="http://github.com/gphat/chart-clicker-examples">code for the examples</a> is available on GitHub). There&#8217;s also a tutorial POD in the distribution. It does pie charts, line graphs, bar graphs, area graphs, stacked bar or area or line graphs,  points, bubbles, or candlestick-style charts. In short, it makes pretty pictures in Perl:</p>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 510px"><a href="http://www.onemogin.com/clicker/examples/"><img class=" " title="area.png, from the Examples page" src="http://www.onemogin.com/clicker/images/area.png" alt="area.png" width="500" height="250" /></a><p class="wp-caption-text">area.png, from the Examples page</p></div>
<p style="text-align: left;">The above is just one of the images shown as examples of what Chart::Clicker can do.</p>
<p style="text-align: left;">The module bases its rendering on <a href="http://search.cpan.org/dist/Graphics-Primitive">Graphics::Primitive</a>, specifically <a href="http://search.cpan.org/dist/Graphics-Primitive-Driver-Cairo">Graphics::Primitive::Driver::Cairo</a>. This means it can render the chart in any format Cairo supports; PNG, PDF, even SVG among others. The internal object-model is based on Moose, which leads to keeping potentially-duplicate code to a minimum. Using the package is about as complex as you need your graph to be: a simple graph with a single set of data can be created in just 5 lines of code or so, while some of the examples are much more complicated scripts.</p>
<p style="text-align: left;">I&#8217;m surprised to see (according to <a href="http://cpants.perl.org/dist/used_by/Chart-Clicker">CPANTS</a>) that this module is not a component in any other packages&#8217; lists of dependencies. It would seem to me to be a logical bit of functionality to integrate into a Catalyst view, or any stats package. I won&#8217;t be surprised if this changes in the near future, as (hopefully) more people start using the package.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/11/23/perl-module-monday-chartclicker/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Perl Module Monday: DBIx::Connector</title>
		<link>http://www.dereferenced.com/2009/11/09/perl-module-monday-dbixconnector/</link>
		<comments>http://www.dereferenced.com/2009/11/09/perl-module-monday-dbixconnector/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 07:07:40 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=85</guid>
		<description><![CDATA[For this installment of PMM, I would like to venture into the realm of database connectivity and bring some attention on a new player, David Wheeler&#8217;s DBIx::Connector.
What I like most about this is that it scratches a particular itch I often have when writing long-lived DB code: I get tired of always pinging the database [...]]]></description>
			<content:encoded><![CDATA[<p>For this installment of PMM, I would like to venture into the realm of database connectivity and bring some attention on a new player, <a href="http://www.justatheory.com/">David Wheeler</a>&#8217;s <a href="http://search.cpan.org/dist/DBIx-Connector/"><tt>DBIx::Connector</tt></a>.</p>
<p>What I like most about this is that it scratches a particular itch I often have when writing long-lived DB code: I get tired of always pinging the database through the handle, to make sure the connection is still there before attempting any new operation. On this point alone, <tt>DBIx::Connector</tt> is worth installing.</p>
<p>Fortunately, that wasn&#8217;t the only itch <em>he</em> was scratching, when he wrote it, so it does a lot more than just simplify persistent connections. It&#8217;s fork- and thread-safe, handles transactions and save-points (nested, no less), and does it all while letting you choose when/if the database gets pinged, and what happens when the connection is no longer active.</p>
<p>For more explanation and coverage, see David&#8217;s post <a href="http://www.justatheory.com/computers/programming/perl/modules/dbix-connector-updated.html">here</a>. He&#8217;s also woven it into his <tt>Catalyst</tt> tutorial, which is tagged <a href="http://www.justatheory.com/computers/programming/perl/catalyst/">here</a> (and made available on GitHub <a href="http://github.com/theory/catalyst-tutorial">here</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/11/09/perl-module-monday-dbixconnector/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Perl Module Monday: Try::Tiny</title>
		<link>http://www.dereferenced.com/2009/10/26/perl-module-monday-trytiny/</link>
		<comments>http://www.dereferenced.com/2009/10/26/perl-module-monday-trytiny/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:18:19 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=80</guid>
		<description><![CDATA[While I am a devout and enthusiastic Perl proponent, there are things that I wish Perl had, or had done differently. One of these is the lack of a clearly-defined exception framework. It&#8217;s one of the (very) few things I think Java does better than Perl. Over the years, CPAN has been host to several [...]]]></description>
			<content:encoded><![CDATA[<p>While I am a devout and enthusiastic Perl proponent, there are things that I wish Perl had, or had done differently. One of these is the lack of a clearly-defined exception framework. It&#8217;s one of the (<em>very</em>) few things I think Java does better than Perl. Over the years, CPAN has been host to <a href="http://search.cpan.org/dist/TryCatch">several</a> <a href="http://search.cpan.org/dist/Exception-Class-TryCatch">variations</a> on try/catch-style <a href="http://search.cpan.org/dist/Throwable">syntactic</a> <a href="http://search.cpan.org/dist/Error">sugar</a>. But  I now have a favorite: <a href="http://search.cpan.org/dist/Try-Tiny">Try::Tiny</a>.</p>
<p>While I had noticed the module scroll by the CPAN Twitter feed, I hadn&#8217;t paid much attention to it at first. I <em>like</em> the idea of clean try/catch, but I haven&#8217;t used it in any of my modules because I didn&#8217;t want to make the lists of dependencies any longer than they have to be. TryCatch, for example, uses Moose, which is a lot to install simply to have a clean exception model.</p>
<p>Then I read <a href="http://bulknews.typepad.com/blog/2009/10/trytiny-.html">this blog post</a> about it, and became much more interested. First off, Tatsuhiko was showing a lot of enthusiasm for something for something that isn&#8217;t Plack or PSGI (just teasing!). But mostly, it was just the relief of having a nice try/catch pair with no dependencies.</p>
<p>Let me say that part again, just in case you&#8217;re skimming: NO DEPENDENCIES.</p>
<p>Well, aside from Test::More at build-time, but you have that lying around already, right?</p>
<p>This one is absolutely going into the toolbox for future use. I&#8217;m also going to look for places where it seems to be an especially-good fit with other modules. (More on that, later.)</p>
<p><a href="http://search.cpan.org/dist/Try-Tiny">Try::Tiny</a>. Give it a, errrr, try&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/10/26/perl-module-monday-trytiny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl Module Monday: Timeout::Queue</title>
		<link>http://www.dereferenced.com/2009/10/12/perl-module-monday-timeoutqueue/</link>
		<comments>http://www.dereferenced.com/2009/10/12/perl-module-monday-timeoutqueue/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 06:16:52 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=67</guid>
		<description><![CDATA[This week, another in the modules-I-plan-to-use series. For my current CPAN Twitter-bot, I essentially wrote the infrastructure that Timeout::Queue would have provided me with, had I known about it at the time. So I plan to use it in my ongoing re-write (which isn&#8217;t much further along than the last time I mentioned it).
What it [...]]]></description>
			<content:encoded><![CDATA[<p>This week, another in the modules-I-plan-to-use series. For my current <a href="http://twitter.com/cpan_linked">CPAN Twitter-bot</a>, I essentially wrote the infrastructure that <a href="http://search.cpan.org/dist/Timeout-Queue">Timeout::Queue</a> would have provided me with, had I known about it at the time. So I plan to use it in my ongoing re-write (which isn&#8217;t much further along than the <a href="http://www.dereferenced.com/2009/09/28/perl-module-monday-nettwitterlite/">last time</a> I mentioned it).</p>
<p>What it does, in a nutshell, is manage a queue in terms of how soon each item is supposed to occur in time. As an element is enqueued, part of the process is specifying how soon the item should &#8220;time-out&#8221; in reference to the current moment. Then the object referent can be used to sleep until the next element&#8217;s time-out occurs, at which point you can retrieve all the items that are currently &#8220;timed-out&#8221;.</p>
<p>In my current bot, I poll the RDF feed from <a href="http://search.cpan.org/">search.cpan.org</a> every 15 minutes. When there are new items to post to the Twitter stream, I try to space them out over the next 15 minutes so that the bot doesn&#8217;t spew too many updates at once. I do this by dividing the 15 minute interval by the number of updates to post, then queuing them up with appropriate gaps between them. I also use the same queue approach to set the next poll of the feed, to check for changes/updates.</p>
<p>The code isn&#8217;t overly-complex, but it does lend itself to some subtle errors. In the early stages, I would often see updates come in &#8220;clumps&#8221;, because I had mis-managed the offset calculations. Had I known about this module, I could have saved myself some work. It does everything my code does, and does a few things more that I didn&#8217;t think to write.</p>
<p>If I could change anything about the module, I&#8217;d probably just have it offer a sleep() method to avoid having to explicitly ask for the current amount of time to wait, then having to do the sleep myself. It seems like that will always be the usage pattern, so it would make sense to have it be an available method. Then again, if it&#8217;s a good OO citizen and can be easily sub-classed, maybe I&#8217;ll just sub-class it and add the method myself! Then I can make the other change&#8211; the name. Call me pedantic, but I feel that &#8220;Queue&#8221; should have been the first element of the namespace, and I&#8217;m not really keen on the use of &#8220;Timeout&#8221;, since the items don&#8217;t really &#8220;time-out&#8221; in the sense of waiting for an alarm signal or anything. But these are minor nits.</p>
<p>This will be Yet Another piece of code that makes my coding task easier. (Once I get enough tuits to get back to that project.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/10/12/perl-module-monday-timeoutqueue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl Module Monday: Net::Twitter(::Lite)</title>
		<link>http://www.dereferenced.com/2009/09/28/perl-module-monday-nettwitterlite/</link>
		<comments>http://www.dereferenced.com/2009/09/28/perl-module-monday-nettwitterlite/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 05:42:59 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=62</guid>
		<description><![CDATA[(If I keep covering multiple modules in a post, I&#8217;m going to have to change the title and tag I use&#8230;)
I generally try to use these posts to highlight lesser-known modules, and I imagine that the Net::Twitter module is fairly higher-profile than most of my previous choices. But are you familiar with Net::Twitter::Lite, as well?
It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>(If I keep covering multiple modules in a post, I&#8217;m going to have to change the title and tag I use&#8230;)</p>
<p>I generally try to use these posts to highlight lesser-known modules, and I imagine that the <a href="http://search.cpan.org/dist/Net-Twitter">Net::Twitter</a> module is fairly higher-profile than most of my previous choices. But are you familiar with <a href="http://search.cpan.org/dist/Net-Twitter-Lite">Net::Twitter::Lite</a>, as well?</p>
<p>It&#8217;s not unusual for CPAN to offer more than one solution to a given problem. The wide range of XML parsers is a testament to this. And when a subject is popular, the odds are even greater that people may choose to &#8220;roll their own&#8221; rather than trying to contribute to an existing effort. Fortunately, the interface to the social messaging service <a href="http://twitter.com">Twitter</a> has been spared this. Maybe it&#8217;s because the source code is <a href="http://github.com/semifor/Net-Twitter">hosted on GitHub</a>, and thus it is easier for people to contribute. Whatever the reason, the only real competition to Net::Twitter for basic Twitter API usage is Net::Twitter::Lite. And it&#8217;s not actually a competitor in the general sense.</p>
<p>Rather than representing a competing implementation, Net::Twitter::Lite came about as an (almost completely) interface-compatible alternative to Net::Twitter after it was refactored to use Moose internally. While it doesn&#8217;t have 100% of the features that Net::Twitter has, both modules strive for 100% coverage of Twitter&#8217;s API. Where N::T::Lite runs without the additional requirement of Moose, N::T gives you finer-grained control over which parts of the API are loaded and made available to connection objects.</p>
<p>I&#8217;ve used both modules, and can attest to the fact that the interface is kept consistent between them. At $DAY_JOB I authored a tool to echo data to a Twitter stream, for which N::T::L was the best choice as it had the fewest dependencies and our needs did not call for the additional functionality of N::T. My Twitter-bot (<a href="http://twitter.com/cpan_linked">cpan_linked</a>) was written with N::T in the pre-Moose days, and has not had a single problem since I seamlessly upgraded N::T to the Moose-based version. As I work on the next generation CPAN-bot, I&#8217;ll be using the OAuth support, as well as possibly the search API. Since it will be a long-running daemon, I&#8217;ll stick with the more-featureful N::T for it. But thanks to the diligence of the modules&#8217; authors, I could just as easily swap between them at will.</p>
<p>If you&#8217;re planning to interface to Twitter from Perl, these two modules should be your starting point. But be sure to look at the <a href="http://search.cpan.org/search?query=twitter&amp;mode=all">other Twitter-oriented modules</a>, just to be sure. There&#8217;s a lot of activity around this API, and Perl developers have kept on top of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/09/28/perl-module-monday-nettwitterlite/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Perl Module Monday: File::Find::Object</title>
		<link>http://www.dereferenced.com/2009/09/21/perl-module-monday-filefindobject/</link>
		<comments>http://www.dereferenced.com/2009/09/21/perl-module-monday-filefindobject/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 23:00:09 +0000</pubDate>
		<dc:creator>rjray</dc:creator>
				<category><![CDATA[CPAN]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[module-monday]]></category>

		<guid isPermaLink="false">http://www.dereferenced.com/?p=59</guid>
		<description><![CDATA[When Higher Order Perl came out, one of the first concepts from it that I was able to make immediate use of was that of iterators. Wonderful things, iterators, when suitable to the task at hand. I used an iterator class to hide from the user-level when a DBI-style database statement handle was actually 4 [...]]]></description>
			<content:encoded><![CDATA[<p>When <a href="http://www.amazon.com/gp/product/1558607013?ie=UTF8&amp;tag=rjrayorg-20&amp;linkCode=xm2&amp;camp=1789&amp;creativeASIN=1558607013">Higher Order Perl</a> came out, one of the first concepts from it that I was able to make immediate use of was that of <em>iterators</em>. Wonderful things, iterators, when suitable to the task at hand. I used an iterator class to hide from the user-level when a DBI-style database statement handle was actually 4 separate handles on 4 separate hosts. So any time I see a stream interface get converted to an iterator, I at least give it a fair looking-over.</p>
<p>The <a href="http://search.cpan.org/dist/File-Find-Object/">File::Find::Object</a> module is an excellent example of this. It takes the concept of File::Find as found in Perl&#8217;s core, and makes into an iterative, object-oriented interface. It has two features that sell me on it, over vanilla File::Find:</p>
<ul>
<li>You can instantiate more than one instance of the finder at a time, as it has no global-variable usage to cause problems. This allows side-by-side comparison of finds run in different directories, sub-finds that execute based on interim results from the current find, etc.</li>
<li>Once initialized, it acts as an iterator. This has two obvious benefits: firstly, you can stop when you want without using any tricks such as <code>die</code>-ing or forcing <code>$File::Find::prune</code>. The second benefit is less apparent, until you run your find on a huge set of directories and files; as an iterator, the finder will only move forward as you call it. It doesn&#8217;t immediately sprint full-steam-ahead over the whole of the search-space.</li>
</ul>
<p>Shlomi Fish has taken over most of the maintenance of the module. His main write-up on it is <a href="http://www.shlomifish.org/open-source/projects/File-Find-Object/">here</a>, with links to CPAN, Kobesearch and Freshmeat. That page also links to <a href="http://search.cpan.org/dist/File-Find-Object-Rule/">File::Find::Object::Rule</a>, a port of File::Find::Rule to FFO. Shlomi has also written about the module more extensively, under the heading, &#8220;<a href="http://community.livejournal.com/shlomif_tech/29315.html">What you can do with File-Find-Object (that you can&#8217;t with File::Find)</a>&#8220;. This second posting has some very useful examples of FFO in action, and I highly recommend reading it and then giving FFO a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dereferenced.com/2009/09/21/perl-module-monday-filefindobject/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
