<?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>PreshBlog &#187; Perl</title>
	<atom:link href="http://www.preshweb.co.uk/category/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.preshweb.co.uk</link>
	<description>David Precious - professional Perl developer, motorcyclist and beer drinker</description>
	<lastBuildDate>Tue, 24 Jan 2012 10:03:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3-aortic-dissection</generator>
		<item>
		<title>Dancer talk at YAPC::NA 2012</title>
		<link>http://www.preshweb.co.uk/2012/01/dancer-talk-at-yapcna-2012/</link>
		<comments>http://www.preshweb.co.uk/2012/01/dancer-talk-at-yapcna-2012/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 10:03:50 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=1088</guid>
		<description><![CDATA[<p><a href="http://blog.yapcna.org/">Mark Allen</a> will give a talk at <a href="http://www.yapcna.org/"><a href="http://search.cpan.org/perldoc?YAPC::NA" title="CPAN YAPC::NA" 
target="_blank">YAPC::NA</a> 2012</a> on the <a href="http://www.perldancer.org/">Dancer Perl web framework</a> he describes as:</p>
<blockquote><p>
This talk presents the Dancer web framework beginning with “Hello World” and progressing through a couple of easy to digest introductory applications.  All of the primary Dancer features are presented including URL routing, writing handlers, and output templating.  A selection of useful and common Dancer plugins will also be covered.  This talk is best suited for beginning and intermediate Perl programmers.
</p></blockquote>
<p>(<a href="http://blogs.perl.org/users/jt_smith/2012/01/intro-to-dancer.html">via JT Smith</a>, in turn via the <a href="http://blog.yapcna.org/"><a href="http://search.cpan.org/perldoc?YAPC::NA" title="CPAN YAPC::NA" 
target="_blank">YAPC::NA</a> blog</a>.)</p>
<p>I hope it&#8217;s recorded, as I&#8217;d like to see it, but won&#8217;t be able to afford to attend <a href="http://search.cpan.org/perldoc?YAPC::NA" title="CPAN YAPC::NA" 
target="_blank">YAPC::NA</a>.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2012/01/dancer-talk-at-yapcna-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl Advent Calendars for 2011</title>
		<link>http://www.preshweb.co.uk/2011/12/perl-advent-calendars-for-2011/</link>
		<comments>http://www.preshweb.co.uk/2011/12/perl-advent-calendars-for-2011/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 10:22:12 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=1070</guid>
		<description><![CDATA[<p>Well, December is upon us &#8211; time for advent calendars, and as usual, the Perl community doesn&#8217;t disappoint &#8211; here&#8217;s a list of the Perl-related advent calendars I&#8217;m aware of:</p>
<ul>
<li><a href="http://advent.perldancer.org/">Dancer Advent Calendar</a> &#8211; the Dancer web framework&#8217;s calendar (<a href="http://advent.perldancer.org/feed/2011">feed</a>)</li>
<li><a href="http://perladvent.org/2011/">Perl Advent Calendar (perladvent.org)</a> (<a href="http://perladvent.org/2011/atom.xml">feed</a>)</li>
<li><a href="http://www.catalystframework.org/calendar">Catalyst Advent Calendar</a> &#8211; the Catalyst web framework&#8217;s calendar (<a href="http://www.catalystframework.org/calendar/feed/2011">feed</a>)</li>
<li><a href="http://perl6advent.wordpress.com/">Perl6 Advent Calendar</a> (<a href="http://perl6advent.wordpress.com/feed/">feed</a>)</li>
<li><a href="http://sysadvent.blogspot.com/">SysAdvent</a> &#8211; an advent calendar for sysadmins, but often Perl-related</li>
</ul>
<p>There are also several Japanese-language advent calendars:</p>
<ul>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/">http://perl-users.jp/articles/advent-calendar/2011/</a>:
<ul>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/anysan/">AnySan Track</a></li>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/casual/">Casual Track</a></li>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/dbix/">dbix Track</a></li>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/english/">English Track</a></li>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/hacker/">Hacker Track</a></li>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/test/">Test Track</a></li>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/acme/">Acme Track</a></li>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/teng/">Teng Track</a></li>
<li><a href="http://perl-users.jp/articles/advent-calendar/2011/amon2/">Amon2 Track</a></li>
</ul>
</li>
</ul>
<p>If you know of any others, please feel free to let me know and I&#8217;ll add them to the list :)</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/12/perl-advent-calendars-for-2011/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>LPW2011 : my thoughts overall</title>
		<link>http://www.preshweb.co.uk/2011/11/lpw2011-my-thoughts-overall/</link>
		<comments>http://www.preshweb.co.uk/2011/11/lpw2011-my-thoughts-overall/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 13:12:21 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=1059</guid>
		<description><![CDATA[<p>Yesterday, I attended the 2011 London Perl Workshop &#8211; my first ever Perl conference.</p>
<p>I had a good day, met a few members of the Perl community I knew from online interactions who I&#8217;d never met in person before, saw some good talks, and partook in some free food and beer (kindly paid for by the sponsors, including my employer, UK2).</p>
<p>Some brief mentions of talks I attended:</p>
<h2>Matt S Trout (mst) &#8211; First, Tak wrote the world‎</h2>
<blockquote><p>
I have <a href="http://search.cpan.org/perldoc?IO::Pipeline" title="CPAN IO::Pipeline" 
target="_blank">IO::Pipeline</a>. I have <a href="http://search.cpan.org/perldoc?App::FatPacker" title="CPAN App::FatPacker" 
target="_blank">App::FatPacker</a>. I have <a href="http://search.cpan.org/perldoc?IPC::Command::Multiplex" title="CPAN IPC::Command::Multiplex" 
target="_blank">IPC::Command::Multiplex</a>. And yet I still couldn&#8217;t whip up a five line example of bolting them all together that made a compelling argument for a perl-loving sysadmin to stop using fabric.</p>
<p>This problem, among others, will be solved by the conclusion of this talk.
</p></blockquote>
<p>Tak sounds like something which will be very useful to me &#8211; running code on multiple other hosts via SSH, but including Perl code &#8211; with all locally-installed modules available for use at the remote end!</p>
<p>As mst went through explaining how it all worked, my thoughts went from &#8220;hmm, useful&#8221;, to &#8220;hmm, useful but looks over-engineered, not sure it needs to be that complex&#8221; to &#8220;whoah, that&#8217;s genius&#8221;.   Fatpacking and sending code to the remote side, which then adds a coderef to @INC which requests other modules from the local end, sent over and loaded remotely, is awesomely creative.</p>
<p>These kind of tricks remind me of why I love Perl. </p>
<h2>Mike Whitaker (‎Penfold‎) &#8211; ‎Perl and Unicode, the 5.14 edition‎</h2>
<p>A very good talk on handling Unicode safely in Perl, and the gotchas to avoid.  Provided major impetus for me to upgrade to 5.14, too.</p>
<h2>Zefram &#8211; ‎why time is difficult‎</h2>
<blockquote><p>
Dates, times, time intervals, clocks, calendars, and related phenomena are major contributors to hassle in programming, and the source of innumerable bugs.
</p></blockquote>
<p>Zefram&#8217;s talk, whilst barely Perl related, was very interesting, and very well delivered.  I hadn&#8217;t realised quite how complex time was :)</p>
<p>Zefram&#8217;s amusing lightning talk on doing away with source code by simply storing bytecode and editing it by deparsing the source, editing it, then &#8220;compiling&#8221; back to bytecode was also entertaining.</p>
<h2>Claes Jakobsson (‎claes‎) &#8211; ‎Don&#8217;t debug now, debug later</h2>
<blockquote><p>
<a href="http://search.cpan.org/perldoc?Runops::Recorder" title="CPAN Runops::Recorder" 
target="_blank">Runops::Recorder</a> is a alternate runloop for perl that writes down what your program does to disk for playback later</p>
<p>It also comes with a viewer and some helper classes for you to write your own playback tools such as diffs etc.
</p></blockquote>
<p>This looks like a very useful debugging tool, recording the path of execution through your code and writing it to a file which can then later be &#8220;replayed&#8221; using a viewer &#8211; much like single-stepping or tracing through the debugger, but after the fact.  The ability to leave it running and have it dump out a configurable amount of trace data when a die is encountered looks excellently useful for catching intermittent / rare problems &#8211; you should be able to leave it in place, wait until the problem occurs, then replay what happened leading up to the <tt>die</tt> to see what was going on.</p>
<p>Future versions should also be able to track changes to variables, etc, which will be very useful indeed.</p>
<p>There were a couple of workshops I&#8217;d like to have attended, but which I didn&#8217;t; partly because they conflicted with talks I wanted to see, and partly because I didn&#8217;t have a laptop with me to &#8220;work along&#8221; and didn&#8217;t think I could take much of value away from them.</p>
<h2>Andrew Solomon &#8211; ‎[[TRAINING SESSION]] Web development for beginners using Dancer‎</h2>
<p>As a core developer for the <a href="http://www.perldancer.org/">Dancer perl web framework</a> I&#8217;d love to have attended Andrew Solomon&#8217;s workshop, to see what was being taught, and offer any input desired.  Unfortunately, I wasn&#8217;t there, but I&#8217;ll be looking with interest for any feedback from people who were, and what they learned and what they thought of Dancer if they hadn&#8217;t encountered it before.  Making Perl accessible for new users is an important thing.</p>
<h2>Gabor Szabo (‎szabgab‎) &#8211; ‎[[TRAINING SESSION]] Testing in Perl</h2>
<p>I&#8217;d also like to have taken part in Gabor&#8217;s workshops, but they were in two parts and conflicted with several other talks I wanted to see.</p>
<p>I met a few members of the Perl community who I knew from online interactions but had never met in meatspace, so it was great to meet them.  Unfortunately, there were a few others I&#8217;d meant to go introduce myself to, but never got a chance to do so &#8211; including Tatsuhiko Miyagawa and Gabor Szgabo.</p>
<p>Overall, it was a good day, and I imagine there&#8217;s a very good chance I&#8217;ll be back next year :)</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/11/lpw2011-my-thoughts-overall/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LPW2011 : abigail&#8217;s &#8220;Business Aware Developer&#8221; talk</title>
		<link>http://www.preshweb.co.uk/2011/11/lpw2011-abigails-business-aware-developer-talk/</link>
		<comments>http://www.preshweb.co.uk/2011/11/lpw2011-abigails-business-aware-developer-talk/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 12:42:08 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[LPW2011]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=1057</guid>
		<description><![CDATA[<p>I caught abigail&#8217;s &#8220;Business Aware Developer&#8221; talk yesterday at the London Perl Workshop 2011.</p>
<p>Overall, I think it was a good talk, and raised some good points, even if the &#8220;you don&#8217;t always have to write tests, write them only if they provide value&#8221; is a little controversial with some of the audience, leading to a reasonable amount of debate and running late with the talk so having to skip some slides.</p>
<p>Personally, I agree to some degree &#8211; I think some people write tests simply to push up their test coverage figure, without really writing tests which are likely to catch bugs (exercising the code in both expected and unexpected ways, providing strange input and edge cases (does it blow up if given undef or a ref, say).</p>
<p>However, I do think a fair amount of the talk is summed up by advice given to me by a boss at work, Ditlev, with regards to getting stuff out &#8211; sometimes you have to &#8220;launch crap but launch&#8221; &#8211; sometimes code that works well enough to be put into use and making money for you can be more valuable than taking longer to produce better quality code &#8211; which may be nicer and better to work with in the future, but isn&#8217;t ready to launch now.  In other words, examining the trade-off between quick results now, and better quality code which becomes more valuable later &#8211; but &#8220;what if later never comes?&#8221;.</p>
<p>The impression I took away from the talk, which might be a misconception, is that Booking.com don&#8217;t do code reviews or refactoring, which would seriously put me off applying for a position there &#8211; I think code review in particular (even if just casual &#8211; it needn&#8217;t be a formal procedure) is very valuable to push yourself to be a better coder.   If you know other members of the team are going to be glancing over your commits when they have time and pointing at bits you could have done better, that&#8217;s a good motivation to write good code, and also often helps you realise other ways you could have done things.</p>
<p>I&#8217;d be interested in seeing the other slides which abigail had to skip over, but I haven&#8217;t been able to find them anywhere online.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/11/lpw2011-abigails-business-aware-developer-talk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Graphing time-based data in Perl</title>
		<link>http://www.preshweb.co.uk/2011/11/graphing-time-based-data-in-perl/</link>
		<comments>http://www.preshweb.co.uk/2011/11/graphing-time-based-data-in-perl/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 12:38:45 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=1046</guid>
		<description><![CDATA[<p>I recently wanted to produce some graphs from a web app powered by the <a href="http://www.perldancer.org/">Dancer Perl web framework</a>, and reevaluated the various Perl graphing moduiles out there.</p>
<p>Modules I considered were:</p>
<ul>
<li><a href="http://search.cpan.org/perldoc?Chart::Strip" title="CPAN Chart::Strip" 
target="_blank">Chart::Strip</a></li>
<li><a href="http://search.cpan.org/perldoc?Chart::Graph" title="CPAN Chart::Graph" 
target="_blank">Chart::Graph</a></li>
<li><a href="http://search.cpan.org/perldoc?Google::Chart" title="CPAN Google::Chart" 
target="_blank">Google::Chart</a></li>
<li><a href="http://search.cpan.org/perldoc?Chart::Clicker" title="CPAN Chart::Clicker" 
target="_blank">Chart::Clicker</a></li>
<li><a href="http://search.cpan.org/perldoc?Chart::Gnuplot" title="CPAN Chart::Gnuplot" 
target="_blank">Chart::Gnuplot</a></li>
<p>Unfortunately, I didn&#8217;t have time to do a full in-depth writeup trying every module like the excellent ones <a href="http://blogs.perl.org/users/neilb/">Neil Bowers</a> has been doing, but I thought I&#8217;d write up a quick post on the choice I made, with example code, in case it helps other people looking to graph potentially irregularly-spaced time-based data samples in Perl easily.</p>
<p><a href="http://search.cpan.org/perldoc?Chart::Clicker" title="CPAN Chart::Clicker" 
target="_blank">Chart::Clicker</a> looked to be a nice choice (with a nice example of doing just what I want given as the topic answer to <a href="http://stackoverflow.com/questions/1600551/how-can-i-plot-a-time-series-graph-with-perl">a question on StackOverflow</a>), but had a huge chain of dependencies, finally failing when demanding Cairo and various X11 libraries (on my headless server).</p>
<p><a href="http://search.cpan.org/perldoc?Chart::Strip" title="CPAN Chart::Strip" 
target="_blank">Chart::Strip</a> seemed to do exactly what I wanted in a simple way, but I encountered a div-by-zero bug when dealing with a certain dataset with > 89 data points.</p>
<p>I reported this to the author, Jeff Weisgberg in <a href="https://rt.cpan.org/Ticket/Display.html?id=72288">RT #72288</a>, and he promptly released 1.08 with a fix (thanks Jeff!).</p>
<p><a href="http://search.cpan.org/perldoc?Chart::Strip" title="CPAN Chart::Strip" 
target="_blank">Chart::Strip</a> made it simple to do what I wanted:</p>

<div class="wp_syntax"><div class="code"><pre class="perl perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@dataset</span>;
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">fetchrow_hashref</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">push</span> <span style="color: #0000ff;">@dataset</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">time</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>timestamp<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> value <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>value<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span>;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$chart</span> <span style="color: #339933;">=</span> Chart<span style="color: #339933;">::</span><span style="color: #006600;">Strip</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span> title <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;My chart&quot;</span> <span style="color: #009900;">&#41;</span>;
<span style="color: #0000ff;">$chart</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">add_data</span><span style="color: #009900;">&#40;</span>\<span style="color: #0000ff;">@dataset</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span> style <span style="color: #339933;">=&gt;</span> <span style="">'line'</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># then get the chart as an image with $chart-&gt;png</span></pre></div></div>

<p>Nice and easy, just what I wanted &#8211; a way to say &#8220;here&#8217;s some timestamps and values (quite possibly irregularly spaced) &#8211; work out how to plot this sensibly for me&#8221;.</p>
<p>The resulting graphs look good enough to me, e.g.:</p>
<p><a href="http://www.preshweb.co.uk/wp-content/uploads/2011/11/downstream-snr-hour2.png" rel='lightbox'><img src="http://www.preshweb.co.uk/wp-content/uploads/2011/11/downstream-snr-hour2.png" alt="" title="downstream-snr-hour" width="500" height="100" class="alignnone size-full wp-image-1051" /></a></p>
<p><a href="http://www.preshweb.co.uk/wp-content/uploads/2011/11/downstream-snr-24hours2.png" rel='lightbox'><img src="http://www.preshweb.co.uk/wp-content/uploads/2011/11/downstream-snr-24hours2.png" alt="" title="downstream-snr-24hours" width="500" height="100" class="alignnone size-full wp-image-1054" /></a></p>
<p>(Rendered intentionally a little smaller to fit the blog; naturally the graphs can be whatever size you want.  Also, I had to use the <tt>transparent</tt> option to disable transparent backgrounds.)</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/11/graphing-time-based-data-in-perl/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Why IRC is a valuable tool to your development team</title>
		<link>http://www.preshweb.co.uk/2011/10/why-irc-is-a-valuable-tool-to-your-development-team/</link>
		<comments>http://www.preshweb.co.uk/2011/10/why-irc-is-a-valuable-tool-to-your-development-team/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 08:55:15 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=1021</guid>
		<description><![CDATA[<p>IRC (Internet Relay Chat) is a protocol for multi-server text chat between many participants in many channels, started back in 1988.</p>
<p>There are plenty of IRC networks out there for social chatter, including the likes of <a href="http://www.freenode.net/">Freenode</a> and <a href="http://irc.perl.org/">irc.perl.org</a> hosting many channels for Perl and open source channels in general, making it easy to get quick help from developers and users of your favourite project.</p>
<p>However, I find IRC to be a very valuable tool indeed to help development teams collaborate effectively; at work we make extensive use of it.  It&#8217;s useful whether you&#8217;re a formal development team in a corporate environment, or an open source project whose developers / collaborators gather on IRC.</p>
<p>Why is it so useful?  Well:</p>
<h2>It enables quick discussion and collaboration without breaking your workflow</h2>
<p>As a developer, you don&#8217;t want to lose your concentration &#8211; when you&#8217;re &#8220;in the zone&#8221;, you&#8217;re carrying information about the code you&#8217;re working on in your brain, and it doesn&#8217;t stay there for long if you&#8217;re distracted.  Someone walking over to you and starting talking to you, or a phone call, demand more or less 100% attention; you will be distracted, and you will &#8220;fall out of the zone&#8221;, causing your productivity to fall until you get back to where you were.</p>
<p>IRC, on the other hand, means you don&#8217;t have to respond quite so immediately, and I find it easy to flick between coding and IRC (both terminals within <a href="http://www.tenshu.net/p/terminator.html">Terminator</a> for me) without losing focus on where I&#8217;m up to and what I&#8217;m doing.</p>
<p>Most IRC clients support alerting you when your nick is mentioned in a channel or you receive a direct message, so you can ignore general chatter in the channel until you&#8217;re ready to read it, but know if someone is trying to get your attention.</p>
<p>Of course, it&#8217;s even more valuable when your development team work from multiple locations, whether that&#8217;s having employees working from home, or multiple offices.</p>
<h2>Logs of discussions can be valuable for future reference</h2>
<p>If you keep logs of your discussions, it&#8217;s easy to refer back to later &#8211; sometimes you&#8217;ll remember &#8220;ah, yes, we talked about this &#8211; what was the outcome?&#8221; &#8211; quick log search, and your answer is there.  &#8220;Why did we decide that this was the best way to implement this?&#8221; &#8211; log search &#8211; &#8220;ah, that was why&#8221;.</p>
<h2>Open, widely-supported protocol</h2>
<p>IRC is an open, widely supported protocol; there&#8217;s various clients available for pretty much every platform, so whatever system your devs work on, they&#8217;ll be able to find a client that suits them.</p>
<h2>Easily extensible to integrate with other tools</h2>
<p>It&#8217;s easy to write IRC &#8220;bots&#8221; which can help integrate with various other tools in various ways.</p>
<p>A good example is providing easy links to commits / bug reports or issues / pull requests etc.</p>
<p>If you&#8217;re using my <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::GitHub" title="CPAN Bot::BasicBot::Pluggable::Module::GitHub" 
target="_blank">Bot::BasicBot::Pluggable::Module::GitHub</a> for instance, you can mention an issue and have the bot automatically provide a summary and an URL for anyone who wants to see what the issue in question is &#8211; e.g.:</p>
<pre>
&lt;user1&gt; Anyone had a moment to look at Issue 42 and see what's going on?
&lt;bot&gt; Issue 42 (It doesn't work) https://github.com/....
&lt;user2&gt; Oh yeah - I fixed that in 5fcbb01
&lt;bot&gt; Commit 5fcbb01 (Retarded logic fail.) - https://github.com/....
</pre>
<p>It&#8217;s easy to cobble together a simple bot or bot module to do this kind of stuff for whatever your in-house situation requires, if there&#8217;s nothing suitable already out there on CPAN (which, a lot of the time, there already will be).</p>
<p>GitHub provide post-receive hooks which can be configured to announce pushes to your IRC channel(s).  <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::GitHub::Announce" title="CPAN Bot::BasicBot::Pluggable::GitHub::Announce" 
target="_blank">Bot::BasicBot::Pluggable::GitHub::Announce</a> can automatically announce new/updated issues, and, in future releases, also pull requests and commits/pushes.</p>
<h2>System problems reported instantly</h2>
<p>Use something like my <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::Nagios" title="CPAN Bot::BasicBot::Pluggable::Module::Nagios" 
target="_blank">Bot::BasicBot::Pluggable::Module::Nagios</a>, and you can have system problems reported automatically to the appropriate IRC channels, for quick attention by whoever needs to deal with them.  I use an applet in my GNOME system tray which alerts me to problems, but seeing them reported in detail on IRC is handy, and also strikes up conversation about it &#8211; a simple &#8220;I&#8217;m on it ^^&#8221; is enough to let others know you&#8217;re dealing with the issue and they don&#8217;t need to worry about it.</p>
<h2>Announce tweets about your company/brand/project/interests</h2>
<p>My <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::TwitterWatch" title="CPAN Bot::BasicBot::Pluggable::Module::TwitterWatch" 
target="_blank">Bot::BasicBot::Pluggable::Module::TwitterWatch</a> module allows you to have the bot watch for and report new posts on Twitter about your company/project/brand/stuff of interest, and post them to your IRC channel &#8211; either for awareness, or to strike up discussion about them.</p>
<h2>Wrap various other tools</h2>
<p>Your IRC bot(s) can provide various other useful facilities &#8211; for instance, find the corelist command useful?  <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::CoreList" title="CPAN Bot::BasicBot::Pluggable::Module::CoreList" 
target="_blank">Bot::BasicBot::Pluggable::Module::CoreList</a> makes it easy for your bot to answer corelist lookups within the flow of a conversation.</p>
<pre>
&lt;user1&gt; Could use <a href="http://search.cpan.org/perldoc?File::Spec" title="CPAN File::Spec" 
target="_blank">File::Spec</a> - that's part of core, isn't it?
&lt;user2&gt; bot: corelist <a href="http://search.cpan.org/perldoc?File::Spec" title="CPAN File::Spec" 
target="_blank">File::Spec</a>
&lt;bot&gt; <a href="http://search.cpan.org/perldoc?File::Spec" title="CPAN File::Spec" 
target="_blank">File::Spec</a> was first released with perl 5.00503 (released on 1999-03-28)
&lt;user2&gt; Yep :)
</pre>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/10/why-irc-is-a-valuable-tool-to-your-development-team/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bot::BasicBot::Pluggable::Module::Nagios released</title>
		<link>http://www.preshweb.co.uk/2011/10/botbasicbotpluggablemodulenagios-released/</link>
		<comments>http://www.preshweb.co.uk/2011/10/botbasicbotpluggablemodulenagios-released/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 15:03:09 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=1019</guid>
		<description><![CDATA[<p>I&#8217;ve just released <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::Nagios" title="CPAN Bot::BasicBot::Pluggable::Module::Nagios" 
target="_blank">Bot::BasicBot::Pluggable::Module::Nagios</a> &#8211; a module for IRC bots powered by <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable" title="CPAN Bot::BasicBot::Pluggable" 
target="_blank">Bot::BasicBot::Pluggable</a> which monitors one or more Nagios instances and reports problems to IRC channels.</p>
<p>I&#8217;ll be using this at work to have service problems reported to us on IRC for quick attention, but figured it&#8217;s something that&#8217;s likely to be of use to others elsewhere, too, so I&#8217;m releasing it.</p>
<p>There&#8217;s still some more features and improvements I want to make (a TODO list is included in the module POD), but it&#8217;s at a state where I consider it to be usable (it works for me).</p>
<p>Feedback/suggestions welcome.</p>
<p>It should be on a CPAN mirror near you soon, and <a href="https://github.com/bigpresh/Bot-BasicBot-Pluggable-Module-Nagios">the repo is on GitHub</a> should you wish to submit pull requests or raise issues for bug reports/feature requests.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/10/botbasicbotpluggablemodulenagios-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bot::BasicBot::Pluggable::Module::GitHub released</title>
		<link>http://www.preshweb.co.uk/2011/10/botbasicbotpluggablemodulegithub-released/</link>
		<comments>http://www.preshweb.co.uk/2011/10/botbasicbotpluggablemodulegithub-released/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 17:21:34 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=1009</guid>
		<description><![CDATA[<p>I&#8217;ve released a new distribution for <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable" title="CPAN Bot::BasicBot::Pluggable" 
target="_blank">Bot::BasicBot::Pluggable</a> powered IRC bots, providing some useful GitHub-related functionality, named <a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::GitHub" title="CPAN Bot::BasicBot::Pluggable::Module::GitHub" 
target="_blank">Bot::BasicBot::Pluggable::Module::GitHub</a>.</p>
<p>The following modules are included &#8211; see the documentation for each for more details on how to use them.</p>
<h2><a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::GitHub::EasyLinks" title="CPAN Bot::BasicBot::Pluggable::Module::GitHub::EasyLinks" 
target="_blank">Bot::BasicBot::Pluggable::Module::GitHub::EasyLinks</a></h2>
<p>Provides quick URLs to view issues/pull requests etc when someone mentions one &#8211; for example:</p>
<pre><code>
&lt;user&gt; Go have a look at Issue 42
&lt;bot1&gt; Issue 42 (It doesn't work) https://github.com/....
&lt;user&gt; I fixed that in 5fcbb01
&lt;bot1&gt; Commit 5fcbb01 (Retarded logic fail.) - https://github.com/....
</code></pre>
<p>You can set a default project per-channel, so the above examples will look at whatever project is set as default for the channel the message was in.</p>
<p>You can also explicitly tell it to look at any other GitHub project:</p>
<pre><code>
&lt;user&gt; 5fcbb01 @ bigpresh/Bot-BasicBot-Pluggable-Module-GitHub
&lt;bot1&gt; Commit 5fcbb01 (Retarded logic fail.) - https://github.com/...
</code></pre>
<h2><a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::GitHub::PullRequests" title="CPAN Bot::BasicBot::Pluggable::Module::GitHub::PullRequests" 
target="_blank">Bot::BasicBot::Pluggable::Module::GitHub::PullRequests</a></h2>
<p>Monitor pull requests for GitHub projects.</p>
<p>Example:</p>
<pre><code>
<@bigpresh> !pr
&lt; sophie&gt; Open pull requests for sukria/Dancer : 8 pull requests open (felixdo:3, perlpilot:1, jamhed:1, dams:1, ambs:1, JTimothyKing:1)
</code></pre>
<h2><a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::GitHub::Announce" title="CPAN Bot::BasicBot::Pluggable::Module::GitHub::Announce" 
target="_blank">Bot::BasicBot::Pluggable::Module::GitHub::Announce</a></h2>
<p>Announces issues raised/closed for each channel&#8217;s default project.</p>
<p>Periodically checks on issues for each project, and reports changes,<br />
for example:</p>
<pre><code>
&lt; sophie&gt; Issues closed : 667 (<a href="http://search.cpan.org/perldoc?YAML::XS" title="CPAN YAML::XS" 
target="_blank">YAML::XS</a> for <a href="http://search.cpan.org/perldoc?Session::YAML" title="CPAN Session::YAML" 
target="_blank">Session::YAML</a>) by jamhed : https://github.com/sukria/Dancer/issues/667
</code></pre>
<p>The code is on CPAN, and is <a href="https://github.com/bigpresh/Bot-BasicBot-Pluggable-Module-GitHub">available on GitHub</a>.  Contributions / bug reports / suggestions encouraged.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/10/botbasicbotpluggablemodulegithub-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dancer 1.3072 released</title>
		<link>http://www.preshweb.co.uk/2011/08/dancer-1-3080-released/</link>
		<comments>http://www.preshweb.co.uk/2011/08/dancer-1-3080-released/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 15:22:09 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=977</guid>
		<description><![CDATA[<p>Version <strike>1.3080</strike>1.3072 of the <a href="http://www.perldancer.org/">Dancer Perl web framework</a> was released today.</p>
<p>It was codenamed the &quot;Precious David Precious&quot; release after me &#8211; thanks guys :)</p>
<p>The changes included are:<br />
<!--more--></p>
<pre>
    [ BUG FIXES ]
    * Fix prefix behavior with load_app (alexrj)
    * send_file() shouldn't clobber previously-set response status
      (David Precious, reported by tylerdu - thanks!)
    * Depend on URI 1.59 - Fixes problems when redirecting with
      UTF-8 strings (Alberto SimÃµes)
    * Fix before_serializer POD fix (Yanick Champoux)

    [ ENHANCEMENTS ]
    * send_file can send data (pass a reference to a scalar), and can
      specify a content-disposition filename. (Alberto SimÃµes)
    * Set 'Server' HTTP response header as well as 'X-Powered-By'.  For cases
      where Dancer is being accessed directly, or the proxy passes on this
      header, it's nice to see it.  (David Precious)

    [ DOCUMENTATION ]
    * Cookbook links to canonical documentation of keywords in Dancer.pm, so
      readers encountering a new keyword can easily see the docs for it
      (David Precious)
    * Docs for debug/warning/error link to <a href="http://search.cpan.org/perldoc?Dancer::Logger" title="CPAN Dancer::Logger" 
target="_blank">Dancer::Logger</a> for details on how to
      control where logs go (David Precious)
    * Document import_warnings option, and mention it &#038; link to that
      documentation in opportune places.
    * Document that 'get' also creates a route for 'HEAD' requests
      (David Precious, prompted by Matt S Trout)
    * Extend request() keyword docs with examples (David Precious)
    * Correct port in Lighty/FCGI example in <a href="http://search.cpan.org/perldoc?Dancer::Deployment" title="CPAN Dancer::Deployment" 
target="_blank">Dancer::Deployment</a>
      (David Precious, thanks to pwfraley in Issue 621)
</pre>
<p>EDIT: I stupidly typed 1.3080, not 1.3072.  1.3080 is to be released fairly soon, and will contain some sweet new features.  1.3072 is the release which came out today, and contains slightly less impressive features :)</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/08/dancer-1-3080-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using p3rl.org for FF search keyword</title>
		<link>http://www.preshweb.co.uk/2011/08/using-p3rl-org-for-ff-search-keyword/</link>
		<comments>http://www.preshweb.co.uk/2011/08/using-p3rl-org-for-ff-search-keyword/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 21:33:17 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=973</guid>
		<description><![CDATA[<p>The lazy side of me enjoys Quick Search bookmarks in Firefox, so that I can type e.g. <tt>cpan ModuleName</tt> to look up a module on CPAN etc, <tt>pd perlfoo</tt> to look up the imaginary <tt>perlfoo</tt> documentation on perldoc, etc.</p>
<p>I also like <a href="http://p3rl.org/">p3rl.org</a>&#8216;s intelligent handling of short URLs, e.g. <a href="http://p3rl.org/Dancer">http://p3rl.org/Dancer</a>, <a href="http://p3rl.org/perlrun">http://p3rl.org/perlrun</a> etc.</p>
<p>It suddenly occurred to me to create a keyword search with the keyword <tt>p3</tt>, and the URL as <tt>http://p3rl.org/%s</tt> &#8211; now I can jump straight to pages I want with  e.g. <tt>p3 Dancer</tt>, <tt>p3 perlrun</tt> etc.</p>
<p>My laziness likes this very much indeed.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/08/using-p3rl-org-for-ff-search-keyword/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy birthday Dancer!</title>
		<link>http://www.preshweb.co.uk/2011/08/happy-birthday-dancer/</link>
		<comments>http://www.preshweb.co.uk/2011/08/happy-birthday-dancer/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 10:28:33 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=967</guid>
		<description><![CDATA[<p>Today marks two years to the day since the first version of Dancer hit CPAN!</p>
<p><a href="http://backpan.perl.org/authors/id/S/SU/SUKRIA/">According to the BackPAN</a>, Dancer-0.9003.tar.gz hit CPAN on 07-Aug-2009.</p>
<p>I think you&#8217;ll agree we&#8217;ve come a long way since then, thanks to the awesome community and user base built up around the project since then.</p>
<p>In these two years, we&#8217;ve had countless valuable contributions from a large list of contributing users (see the list on the <a href="http://www.perldancer.org/about">about page</a>), gathered over 300 watchers on GitHub, had 84 people fork the repository on GitHub, had 620 pull requests submitted&#8230; amazing stuff.</p>
<p><!--more--></p>
<p>We&#8217;ve seen a wide range of awesome Dancer plugins</a> appear on CPAN (see <a href="http://search.cpan.org/perldoc?Dancer::Plugins" title="CPAN Dancer::Plugins" 
target="_blank">Dancer::Plugins</a>, or search on CPAN for &#8220;<a href="http://search.cpan.org/perldoc?Dancer::Plugin" title="CPAN Dancer::Plugin" 
target="_blank">Dancer::Plugin</a>::&#8221;).</p>
<p>We&#8217;ve seen Dancer presented at various conferences including FOSDEM, OSDC.fr, the French Perl Workshop, the Bulgaria Perl Workshop, PyWeb IL (an Israeli Python group).</p>
<p>We&#8217;ve seen screencasts on using Dancer (thanks Gabor!), we&#8217;ve seen Dancer discussed plenty within the Perl community with plenty of helpful suggestions.</p>
<p>Unfortunately, we&#8217;ve also seen some trolling from someone who, for reasons unknown, seems to take a strong dislike to the project &#8211; puzzling.</p>
<p>As a result of some of the trolling which included fake reviews falsely attributed to members of the Sinatra team, we&#8217;ve seen our initial inspiration, Ruby&#8217;s Sinatra project, release a statement proclaiming that <a href="http://www.sinatrarb.com/2011/07/21/sinatra-loves-dancer.html">&#8220;Sinatra Loves Dancer&#8221;</a>.</p>
<p>So, to celebrate Dancer&#8217;s 2nd birthday, I think a little marketing effort would be good &#8211; I&#8217;d like to invite you all to let the world know what yout think!  Do you use Dancer?  Do you like it?  Let people know &#8211; blog about it, tweet about it, leave positive reviews &#038; ratings on <a href="http://cpanratings.perl.org/dist/Dancer">cpanratings</a> or +1&#8242;s on <a href="https://metacpan.org/module/Dancer">MetaCPAN</a> &#8211; however you like.</p>
<p>(If you leave reviews/+1&#8242;s, feel free to also do so for any Dancer plugins you find helpful, too &#8211; they need the love too! :) )</p>
<p>Also, if you don&#8217;t already, please &#8220;watch&#8221; the <a href="https://github.com/sukria/Dancer">Dancer project on GitHub</a> &#8211; just go to the project page and click the &#8220;Watch&#8221; button near the top.</p>
<p>Pithy quotes on what you like about Dancer suitable for inclusion on <a href="http://www.perldancer.org/testimonials">www.perldancer.org/testimonials</a> would be very welcome, too :)</p>
<p>Also, we&#8217;ve come a long way, but we have a long way to go, too &#8211; we have some great improvements to Dancer planned, but suggestions for new features would be very welcome &#8211; it&#8217;s always good to know what users would like to see!</p>
<p>So, happy birthday Dancer, and happy dancing, community!</p>
<p>And, of course, an invitation &#8211; if you&#8217;re interested in Dancer, but aren&#8217;t already part of the vibrant welcoming community in the #dancer IRC channel on irc.perl.org, feel free to join us &#8211; see <a href="http://www.perldancer.org/irc">http://www.perldancer.org/irc</a> for a web chat client if you don&#8217;t use IRC normally.</p>
<p>Cheers</p>
<p>Dave P</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/08/happy-birthday-dancer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Renaming MP3s based on ID3 tags with Perl</title>
		<link>http://www.preshweb.co.uk/2011/07/renaming-mp3s-based-on-id3-tags-with-perl/</link>
		<comments>http://www.preshweb.co.uk/2011/07/renaming-mp3s-based-on-id3-tags-with-perl/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 20:00:33 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=958</guid>
		<description><![CDATA[<p>As mentioned in my previous post on <a href="http://www.preshweb.co.uk/2011/07/retagging-mp3s-by-filename-with-perl/">retagging MP3s by filename</a>, I have a fairly large music collection, and prefer to keep it well organised.</p>
<p>I like the filenames used to always follow the same pattern, so I wrote <a href="https://github.com/bigpresh/misc-scripts/tree/master/mp3-rename">mp3-rename</a>, a Perl script to rename them based on the filename.</p>
<p>It takes a directory name as an argument (if not provided, it will operate upon the current directory).  It will find all the MP3 files within that directory, extract information from the ID3 tags, then display a table showing the renames it will make if you tell it to go ahead, then ask for confirmation.</p>
<p>An example in action:</p>
<pre><code>
[davidp@supernova:~]$ mp3-rename /[...]/Rob\ Costlow\ -\ Woods\ of\ Chaos/
The following renames will be performed:
01 - Meant to Be.mp3    -> 00 - Meant to Be - Rob Costlow.mp3
02 - Reflections.mp3    -> 00 - Reflections - Rob Costlow.mp3
03 - Semester Days.mp3  -> 00 - Semester Days - Rob Costlow.mp3
[...]

Review the above renames to check the info is correct.

Type 'yes' to go ahead: ?>
</code></pre>
<p>(Some lines omitted for brevity)</p>
<p>It uses CPAN modules to do most of the work, including <a href="http://search.cpan.org/perldoc?File::Find::Rule" title="CPAN File::Find::Rule" 
target="_blank">File::Find::Rule</a> to find matching files to work on, <a href="http://search.cpan.org/perldoc?Music::Tag" title="CPAN Music::Tag" 
target="_blank">Music::Tag</a> to handle the tag processing, and <a href="http://search.cpan.org/perldoc?Term::ReadKey" title="CPAN Term::ReadKey" 
target="_blank">Term::ReadKey</a> to find out the terminal size.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/07/renaming-mp3s-based-on-id3-tags-with-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retagging MP3s by filename with Perl</title>
		<link>http://www.preshweb.co.uk/2011/07/retagging-mp3s-by-filename-with-perl/</link>
		<comments>http://www.preshweb.co.uk/2011/07/retagging-mp3s-by-filename-with-perl/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 20:09:10 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=954</guid>
		<description><![CDATA[<p>I have a fairly large music collection in MP3s, and I like my files to be sensibly named and tagged.</p>
<p>One of the tools I use to do that is a Perl script I wrote named <a href="https://github.com/bigpresh/misc-scripts/tree/master/retag-by-filename">retag-by-filename</a>, which allows you to provide a regular expression with named captures (so requires Perl 5.10 or later), and uses that to retag a bunch of MP3 files.</p>
<p>An example of it in use:</p>
<pre><code>
[davidp@supernova:~]$ ls -1 /shared/music/Complete\ Albums/Oasis\ -\ The\ Masterplan/ | head -3
01 - Acquiesce - Oasis.mp3
02 - Underneath The Sky - Oasis.mp3
03 - Talk Tonight - Oasis.mp3

[davidp@supernova:~]$ ./retag-by-filename --dry-run \
  --pattern="(?&lt;track&gt; \d+) \s - \s (?&lt;title&gt; .+ ) \s - \s (?&lt;artist&gt; .+ ) \.mp3" \
  /shared/music/Complete\ Albums/Oasis\ -\ The\ Masterplan/*.mp3
[01] Acquiesce by Oasis ()
[02] Underneath The Sky by Oasis ()
[03] Talk Tonight by Oasis ()
</code></pre>
<p>The <tt>--dry-run</tt> option shows the details of each track, but doesn&#8217;t actually update the tags.  The <tt>--pattern</tt> option supplies the regular expression to match against filenames; you&#8217;ll use named captures named <tt>track</tt>,  <tt>title</tt>, <tt>artist</tt> and <tt>comment</tt> to capture the appropriate parts.  (In the example above, there is no comment to match.)</p>
<p>Thanks to the awesome power afforded by using modules from CPAN (<a href="http://search.cpan.org/perldoc?Music::Tag" title="CPAN Music::Tag" 
target="_blank">Music::Tag</a> and <a href="http://search.cpan.org/perldoc?Getopt::Lucid" title="CPAN Getopt::Lucid" 
target="_blank">Getopt::Lucid</a>), the actual script is 37 lines of code.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/07/retagging-mp3s-by-filename-with-perl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backing up Google contacts/calendar etc</title>
		<link>http://www.preshweb.co.uk/2011/07/backing-up-google-contactscalendar-etc/</link>
		<comments>http://www.preshweb.co.uk/2011/07/backing-up-google-contactscalendar-etc/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 12:59:51 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=946</guid>
		<description><![CDATA[<p>I recently followed a discussion on Twitter after <a href="http://twitter.com/thomasmonopoly">@thomasmonopoly</a>&#8216;s Google account <a href="http://www.twitlonger.com/show/bt5akp">was blocked for unknown reasons</a>, denying him access to the data he&#8217;d entrusted Google with.</p>
<p>I casually mentioned that entrusting Google to store all your data without having backups yourself is a bad idea, and <a href="http://twitter.com/jmrowland">@jmrowland</a> enquired as to how you can back up stuff you create &#8220;in the cloud&#8221; (using Google).</p>
<p>I figured I should share the Perl script I&#8217;m currently using to back up my Google contacts, calendar and Google Reader subscriptions, so I&#8217;ve uploaded<a href="https://github.com/bigpresh/misc-scripts/tree/master/backup-google-stuff">backup-google-stuff on GitHub</a>.</p>
<p>As I only wrote the script for my own use it&#8217;s quite basic and perhaps not particularly user-friendly, but I thought it only fair to share it; if people are interested in it, I may extend it somewhat.  I&#8217;m fairly sure there are other &#8220;backup your Google account&#8221; solutions already out there already, though.</p>
<p>Of course, backing up mail from Gmail is trivial as they offer IMAP access; I don&#8217;t rely on Gmail so I&#8217;ve not bothered with that myself.</p>
<p>EDIT: I&#8217;ve seen <a href="http://www.backupify.com/">Backupify</a> recommended as a good solution for backing up your stuff from Google.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/07/backing-up-google-contactscalendar-etc/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Easy profiling for Dancer apps</title>
		<link>http://www.preshweb.co.uk/2011/07/easy-profiling-for-dancer-apps/</link>
		<comments>http://www.preshweb.co.uk/2011/07/easy-profiling-for-dancer-apps/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 12:32:14 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=941</guid>
		<description><![CDATA[<p>Today I released <a href="http://search.cpan.org/perldoc?Dancer::Plugin::NYTProf" title="CPAN Dancer::Plugin::NYTProf" 
target="_blank">Dancer::Plugin::NYTProf</a>, which provides easy profiling for Dancer apps, powered by the venerable <a href="http://search.cpan.org/perldoc?Devel::NYTProf" title="CPAN Devel::NYTProf" 
target="_blank">Devel::NYTProf</a>.</p>
<p>Using it is simple &#8211; load the plugin in your app:</p>
<pre><code>use <a href="http://search.cpan.org/perldoc?Dancer::Plugin::NYTProf" title="CPAN Dancer::Plugin::NYTProf" 
target="_blank">Dancer::Plugin::NYTProf</a>;</code></pre>
<p>Then, use your app as normal, then, to view the profile data, point your browser to <tt>/nytprof</tt> (e.g. <tt>http://localhost:3000/nytprof</tt>, and you&#8217;ll get a list of profile runs (each request is profiled individually):</p>
<p><a href="http://www.preshweb.co.uk/wp-content/uploads/2011/07/profile-listing.png" rel='lightbox'><img src="http://www.preshweb.co.uk/wp-content/uploads/2011/07/profile-listing-300x99.png" alt="" title="profile-listing" width="300" height="99" class="alignnone size-medium wp-image-942" /></a></p>
<p>Select the profile run you wish to view, and <tt>nytprofhtml</tt> will be invoked behind the scenes to generate the HTML reports, which will then be served up, and you&#8217;ll be looking at the helpful <a href="http://search.cpan.org/perldoc?Devel::NYTProf" title="CPAN Devel::NYTProf" 
target="_blank">Devel::NYTProf</a> reports, to see where time was spent processing your request:</p>
<p><a href="http://www.preshweb.co.uk/wp-content/uploads/2011/07/profile-report.png" rel='lightbox'><img src="http://www.preshweb.co.uk/wp-content/uploads/2011/07/profile-report-300x150.png" alt="" title="profile-report" width="300" height="150" class="alignnone size-medium wp-image-943" /></a></p>
<p>Early days yet, and a lot of room for improvement, but in my testing, it works.</p>
<p>Things I&#8217;d like to add when time permits:</p>
<ul>
<li>The ability to exclude Dancer internals from the profiling (if I can find a clean way to do so)</li>
<li>The ability to enable profiling only for certain requests &#8211; for instance, providing a pattern to match the request URLs you want to profile</li>
<li>The ability to customise the URL at which profiling reports are served up</li>
<li>Check for sane behaviour if prefixes are in use</li>
</ul>
<p>Feedback welcome!</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/07/easy-profiling-for-dancer-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Writing a Bugzilla extension to auto-link commits</title>
		<link>http://www.preshweb.co.uk/2011/07/writing-a-bugzilla-extension-to-auto-link-commits/</link>
		<comments>http://www.preshweb.co.uk/2011/07/writing-a-bugzilla-extension-to-auto-link-commits/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 09:49:59 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=931</guid>
		<description><![CDATA[<p>I&#8217;ve been meaning to write a Bugzilla extension to turn mentions of commits in bug messages into a link to view the commit via our web-based SVN viewer for ages &#8211; this morning I finally found the time to do it.</p>
<p>I needed to use the <tt>bug_format_comment</tt> hook to format comments as they&#8217;re being displayed, turning mentions of commits (e.g. &#8220;Commit 123&#8243; or &#8220;r123&#8243;) into links.</p>
<p>The code was pretty simple:<br />
<!--more--></p>
<p>The following is in <tt>/var/lib/bugzilla3/extensions/LinkCommits/Extension.pm</tt>:</p>
<pre><code lang="perl">
package <a href="http://search.cpan.org/perldoc?Bugzilla::Extension::LinkCommits" title="CPAN Bugzilla::Extension::LinkCommits" 
target="_blank">Bugzilla::Extension::LinkCommits</a>;
use strict;
use base qw(<a href="http://search.cpan.org/perldoc?Bugzilla::Extension" title="CPAN Bugzilla::Extension" 
target="_blank">Bugzilla::Extension</a>);

use constant NAME => 'LinkCommits';

our $VERSION = '0.1';

sub bug_format_comment {
    my ($self, $args) = @_;

    my $regexes = $args->{'regexes'};

    my $commit_match = qr/\b( (?:Commit|r) \s? (\d+) )/x;
    push(@$regexes, { match => $commit_match, replace => \&#038;_link_commit });
}

sub _link_commit {
    my $args = shift;
    my $text      = $args->{matches}->[0];
    my $commitnum = $args->{matches}->[1];

    my $url = "http://warehouse.uk2.net/repolist/?diff=uk2&#038;rev="
        . join ':', $commitnum - 1, $commitnum;
    return qq{<a href="$url">$text</a>};
};

# This must be the last line of your extension.
__PACKAGE__->NAME;
</code></pre>
<p>And that is about it.  Hopefully this might be of use to someone.  Bugzilla comes with a comprehensive Example extension which illustrates this along with various other hooks, but I suspect I&#8217;m not the only one looking to create a simple plugin to make tweaks to bug comments when displaying (like auto-linking to commits), so this might help someone.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/07/writing-a-bugzilla-extension-to-auto-link-commits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure password handling in Dancer apps with Bcrypt</title>
		<link>http://www.preshweb.co.uk/2011/07/secure-password-handling-in-dancer-apps-with-bcrypt/</link>
		<comments>http://www.preshweb.co.uk/2011/07/secure-password-handling-in-dancer-apps-with-bcrypt/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 12:02:33 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=926</guid>
		<description><![CDATA[<p><a href=http://www.loonypandora.co.uk/">James Aitken</a> has released <a href="http://search.cpan.org/perldoc?Dancer::Plugin::Bcrypt" title="CPAN Dancer::Plugin::Bcrypt" 
target="_blank">Dancer::Plugin::Bcrypt</a>, a new plugin for Dancer apps to make secure password hashing using Bcrypt easy.</p>
<p>For a background on why you ought to use Bcrypt rather than simpler hashing, see <a href="http://codahale.com/how-to-safely-store-a-password/">http://codahale.com/how-to-safely-store-a-password/</a> &#8211; basically, using MD5/SHA etc is too inexpensive, meaning that, even with a good salt, cracking the hash isn&#8217;t too hard to do these days, especially with the advent of use of the GPU.  Bcrypt is intentionally expensive and slow (you can decide just how much).</p>
<p><a href="http://search.cpan.org/perldoc?Dancer::Plugin::Bcrypt" title="CPAN Dancer::Plugin::Bcrypt" 
target="_blank">Dancer::Plugin::Bcrypt</a> makes validating a password hash as easy as:</p>
<pre><code lang="perl">
if (bcrypt_validate_password($entered_password, $stored_hash)) {
    ...
}
</code></pre>
<p>Generating a hash to store is also very simple:</p>
<pre><code lang="perl">
my $hash = bcrypt($plaintext);
</code></pre>
<p>Generation of random salt is taken care of for you.</p>
<p>*UPDATE* &#8211; the above is a nice simple way to quickly get secure password hashing with minimal effort &#8211; it is likely not the best way, though.  If you&#8217;re already using <a href="http://search.cpan.org/perldoc?DBIx::Class" title="CPAN DBIx::Class" 
target="_blank">DBIx::Class</a>, then see <a href="http://search.cpan.org/perldoc?DBIx::Class::PassphraseColumn" title="CPAN DBIx::Class::PassphraseColumn" 
target="_blank">DBIx::Class::PassphraseColumn</a> for a better way to do this automatically at your database model level.</p>
<p>Thanks to mst for prompting me to mention the above :)</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/07/secure-password-handling-in-dancer-apps-with-bcrypt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin for easy CPAN module links</title>
		<link>http://www.preshweb.co.uk/2011/06/wordpress-plugin-for-easy-cpan-module-links/</link>
		<comments>http://www.preshweb.co.uk/2011/06/wordpress-plugin-for-easy-cpan-module-links/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 15:48:42 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=903</guid>
		<description><![CDATA[<p>Just installed the <a href="http://wordpress.org/extend/plugins/cpan-auto-link-generator/">CPAN Auto Link Generator</a> WordPress plugin, which automatically matches module names and provides links to the module&#8217;s documentation on CPAN.  Very helpful for anyone blogging about Perl, so thought I&#8217;d give it a link here.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/06/wordpress-plugin-for-easy-cpan-module-links/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dancer::Plugin::SimpleCRUD 0.10 released</title>
		<link>http://www.preshweb.co.uk/2011/06/dancerpluginsimplecrud-0-10-released/</link>
		<comments>http://www.preshweb.co.uk/2011/06/dancerpluginsimplecrud-0-10-released/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 15:44:25 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=901</guid>
		<description><![CDATA[<p>I&#8217;ve just released version 0.10 of <a href="http://search.cpan.org/perldoc?Dancer::Plugin::SimpleCRUD" title="CPAN Dancer::Plugin::SimpleCRUD" 
target="_blank">Dancer::Plugin::SimpleCRUD</a>, incorporating a new <tt>display_columns</tt> option to control which columns should be visible when listing records, kindly <a href="https://github.com/bigpresh/Dancer-Plugin-SimpleCRUD/pull/9">provided by <tt>saberworks</tt> in PR-9</a>.  Also included is a documentation fix for the <tt>editable_columns</tt> option, and implementing the <tt>not_editable_columns</tt> option, courtesy of Alberto Simões (ambs) &#8211; thanks!</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/06/dancerpluginsimplecrud-0-10-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML::Table::FromDatabase 1.00 released with row_callbacks feature</title>
		<link>http://www.preshweb.co.uk/2011/05/htmltablefromdatabase-1-00-released-with-row_callbacks-feature/</link>
		<comments>http://www.preshweb.co.uk/2011/05/htmltablefromdatabase-1-00-released-with-row_callbacks-feature/#comments</comments>
		<pubDate>Tue, 24 May 2011 23:26:49 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=878</guid>
		<description><![CDATA[<p>I just released version 1.00 of <a href="http://search.cpan.org/dist/HTML-Table-FromDatabase"><a href="http://search.cpan.org/perldoc?HTML::Table::FromDatabase" title="CPAN HTML::Table::FromDatabase" 
target="_blank">HTML::Table::FromDatabase</a></a>, with a new <tt>row_callbacks</tt> feature.</p>
<p>You could already declare callbacks on a cell-level basis, so you could say, format monetary values appropriately, round numeric columns, turn URLs into clickable links etc.  Now, you can also declare a callback which receives an entire row as a hashref, which it can modify as needed.</p>
<p>An (admittedly somewhat contrived) example from the documentation:</p>

<div class="wp_syntax"><div class="code"><pre class="perl perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$table</span> <span style="color: #339933;">=</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">Table</span><span style="color: #339933;">::</span><span style="color: #006600;">FromDatabase</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span>
    <span style="color: #339933;">-</span>sth <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">,</span>
    <span style="color: #339933;">-</span>row_callbacks <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#91;</span>
        <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span>;                                                                                 
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>name<span style="color: #009900;">&#125;</span> eq <span style="">'Bob'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;"># Hide this row</span>
                <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000066;">undef</span>;
            <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>name<span style="color: #009900;">&#125;</span> eq <span style="">'John'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;"># John likes to be called Jean these days:</span>
                <span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>name<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="">'Jean'</span>;
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>   
    <span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>       
<span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>I decided to bump the version to 1.00 for the sake of anyone who considers 0.x versions to be unready for production use; this module has been about since 2008 and is working well in production use for me.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/05/htmltablefromdatabase-1-00-released-with-row_callbacks-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Dancer release that will get you hooked!</title>
		<link>http://www.preshweb.co.uk/2011/05/the-dancer-release-that-will-get-you-hooked/</link>
		<comments>http://www.preshweb.co.uk/2011/05/the-dancer-release-that-will-get-you-hooked/#comments</comments>
		<pubDate>Tue, 24 May 2011 13:57:10 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=872</guid>
		<description><![CDATA[<p><a href="http://www.preshweb.co.uk/wp-content/uploads/2011/05/dancer-hooks.png" rel='lightbox'><img src="http://www.preshweb.co.uk/wp-content/uploads/2011/05/dancer-hooks.png" alt="" title="dancer-hooks" width="237" height="227" class="alignright size-full wp-image-874" /></a></p>
<p><a href="http://blogs.perl.org/users/sawyer_x/">Sawyer X</a> wrote up a good post on version 1.3050 of the <a href="http://www.perldancer.org/">Dancer Perl web framework</a> being released &#8211; &quot;<a href="http://blogs.perl.org/users/sawyer_x/2011/05/the-dancer-release-that-will-get-you-hooked.html">The Dancer release that will get you hooked!</a>&quot;.</p>
<p>The addition of extra hooks, along with support for plugins to create hooks, heralds additional flexibility and power for your Dancer apps.</p>
<p>Dancer itself now provides various new hooks you can use to customise its behaviour, including <tt>before_deserializer</tt>, <tt>before_file_render</tt>, <tt>before_error_render</tt>, <tt>before_template_render</tt>, <tt>before_layout_render</tt>, <tt>before_serialization</tt><br />
- see the <a href="http://search.cpan.org/~sukria/Dancer-1.3050/lib/Dancer.pm#hook"><a href="http://search.cpan.org/perldoc?Dancer::hook" title="CPAN Dancer::hook" 
target="_blank">Dancer::hook</a>() documentation</a> for the full list.  Plugins can register their own hooks, which your code can then make use of.</p>
<p>Props go to <a href="http://lumberjaph.net/">Franck Cuny</a> for the implementation, and <a href="http://www.plainblack.com/jt-smith">JT Smith of Plain Black</a> for pushing for this feature and working with the Dancer team in designing the implementation.</p>
<p>Dancer 1.3050 also includes various bug fixes and improvements &#8211; see the <a href="http://cpansearch.perl.org/src/SUKRIA/Dancer-1.3050/CHANGES">CHANGES file</a> for a full list.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/05/the-dancer-release-that-will-get-you-hooked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dancer::Plugin::TimeRequests</title>
		<link>http://www.preshweb.co.uk/2011/05/dancerplugindatabasetimerequests/</link>
		<comments>http://www.preshweb.co.uk/2011/05/dancerplugindatabasetimerequests/#comments</comments>
		<pubDate>Mon, 23 May 2011 23:10:12 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=870</guid>
		<description><![CDATA[<p>Today I knocked up a quick plugin for the <a href="http://www.perldancer.org/">Dancer Perl web framework</a> to log the time taken by requests to help look for bottlenecks &#8211; enter <a href="http://search.cpan.org/dist/Dancer-Plugin-TimeRequests"><a href="http://search.cpan.org/perldoc?Dancer::Plugin::TimeRequests" title="CPAN Dancer::Plugin::TimeRequests" 
target="_blank">Dancer::Plugin::TimeRequests</a></a>.</p>
<p>At the moment it&#8217;s very simple, and simply logs the time taken to execute every request; in the future, I may extend it to support capturing statistics and adding a route handler to display stats (e.g. average request time, which routes take the longest to execute, etc.)</p>
<p>Suggestions / patches welcome &#8211; the code is on GitHub as usual.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/05/dancerplugindatabasetimerequests/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bot::BasicBot::Pluggable::Module::GitHub</title>
		<link>http://www.preshweb.co.uk/2011/05/bot-basicbot-pluggable-module-github/</link>
		<comments>http://www.preshweb.co.uk/2011/05/bot-basicbot-pluggable-module-github/#comments</comments>
		<pubDate>Tue, 10 May 2011 19:40:47 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=839</guid>
		<description><![CDATA[<p>We have an IRC bot in the #dancer IRC channel powered by <a href="http://search.cpan.org/dist/Bot-BasicBot-Pluggable"><a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable" title="CPAN Bot::BasicBot::Pluggable" 
target="_blank">Bot::BasicBot::Pluggable</a></a>, and I recently wrote some new features as a distribution of modules which I plan to release to CPAN soon.</p>
<p>Until then, you can see the code in the <a href="https://github.com/bigpresh/Bot-BasicBot-Pluggable-Module-GitHub"><a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::GitHub" title="CPAN Bot::BasicBot::Pluggable::Module::GitHub" 
target="_blank">Bot::BasicBot::Pluggable::Module::GitHub</a> repository on GitHub</a>.</p>
<p>There are two modules so far:</p>
<h2>EasyLinks</h2>
<p><a href="http://search.cpan.org/perldoc?Bot::BasicBot::Pluggable::Module::GitHub::EasyLinks" title="CPAN Bot::BasicBot::Pluggable::Module::GitHub::EasyLinks" 
target="_blank">Bot::BasicBot::Pluggable::Module::GitHub::EasyLinks</a> recognises certain elements within discussions on IRC and provides responses containing titles/URLs to see the corresponding entity, for instance:</p>
<pre><code>
&lt;someuser&gt; I'm just working on Issue 42 now
&lt;bot&gt; Issue 42 (Issue Title - Issues - sukria/Dancer - GitHub) - https://github.com/user/project/issues/42

&lt;someuser&gt; I've just submitted PR 517, anyone want to merge it?
&lt;bot&gt; Pull request 517 (Pull request title - Pull Request - GitHub) - https://github.com/user/project/pull/517

&lt;someuser&gt; What do you think of commit 0d2752 then?
&lt;bot&gt; Commit 0d2752 (Commit message summary here) - https://github.com/user/project/commit/0d2752...
</code></pre>
<h2>PullRequests</h2>
<p>Responds to a !pr command, reporting the number of open pull requests, either for whatever project is specified as the default for that channel, or a specific project can be named.  For instance:</p>
<pre><code>
&lt;someuser&gt; !pr user/project
&lt;bot&gt; Open pull requests for user/project : 5 pull requests open (usera:3, userb:2)
</code></pre>
<p>I plan to add more features before releasing the first version to CPAN; in particular, I&#8217;d like to add commit hook support, so the module could spawn a trivial webserver to listen for hook triggers from GitHub, and announce commits.</p>
<p>As always, contributions would be welcomed.</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/05/bot-basicbot-pluggable-module-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcoming ambs to the Dancer core dev team</title>
		<link>http://www.preshweb.co.uk/2011/05/welcoming-ambs-to-the-dancer-core-dev-team/</link>
		<comments>http://www.preshweb.co.uk/2011/05/welcoming-ambs-to-the-dancer-core-dev-team/#comments</comments>
		<pubDate>Tue, 10 May 2011 08:38:26 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=836</guid>
		<description><![CDATA[<p><a href="http://blogs.perl.org/users/alberto_simoes/">Alberto Simões</a> (ambs) has been a helpful contributor to the <a href="http://www.perldancer.org/">Perl Dancer web framework</a> for some time now, submitting a lot of helpful pull requests and being a valued member of the community providing ideas and support to new users.</p>
<p>I&#8217;m very happy to note that ambs <a href="https://github.com/sukria/Dancer/commit/0d275260c973ba29d8018a0d1800708fd3092df7">is now a member of the Dancer core developers team</a> &#8211; great to see all that hard work recognised (well, Dancer 1.3030 was released with codename &#8220;Silence of the ambs&#8221; as recognition too :) )</p>
<p>Welcome aboard, ambs!</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/05/welcoming-ambs-to-the-dancer-core-dev-team/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dancer::Plugin::SimpleCRUD 0.03 and Dancer::Plugin::Database 1.24</title>
		<link>http://www.preshweb.co.uk/2011/05/dancer-plugins-simplecrud-0-03-and-database-1-24/</link>
		<comments>http://www.preshweb.co.uk/2011/05/dancer-plugins-simplecrud-0-03-and-database-1-24/#comments</comments>
		<pubDate>Mon, 09 May 2011 22:33:17 +0000</pubDate>
		<dc:creator>bigpresh</dc:creator>
				<category><![CDATA[Dancer web framework]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.preshweb.co.uk/?p=831</guid>
		<description><![CDATA[<p>A busy evening&#8217;s hacking on Dancer plugins tonight.  I&#8217;ve released <a href="http://search.cpan.org/dist/Dancer-Plugin-SimpleCRUD"><a href="http://search.cpan.org/perldoc?Dancer::Plugin::SimpleCRUD" title="CPAN Dancer::Plugin::SimpleCRUD" 
target="_blank">Dancer::Plugin::SimpleCRUD</a></a> 0.03, which incorporates a new search feature kindly contributed by <a href="http://blogs.perl.org/users/alberto_simoes/">Alberto Simões</a> which I&#8217;ve been meaning to release for a while, along with removing the dependency on <a href="http://search.cpan.org/perldoc?SQL::Abstract" title="CPAN SQL::Abstract" 
target="_blank">SQL::Abstract</a> in favour of the convenience methods provided by <a href="http://search.cpan.org/dist/Dancer-Plugin-Database"><a href="http://search.cpan.org/perldoc?Dancer::Plugin::Database" title="CPAN Dancer::Plugin::Database" 
target="_blank">Dancer::Plugin::Database</a></a>, which will make <a href="http://search.cpan.org/perldoc?D::P::SimpleCRUD" title="CPAN D::P::SimpleCRUD" 
target="_blank">D::P::SimpleCRUD</a> work correctly with PostgreSQL databases too &#8211; thanks to Jonathan Barber for reporting this issue in <a href="https://rt.cpan.org/Ticket/Display.html?id=68040">RT #68040</a>.</p>
<p>(I should point out that the problem was not with <a href="http://search.cpan.org/perldoc?SQL::Abstract" title="CPAN SQL::Abstract" 
target="_blank">SQL::Abstract</a>, but with <a href="http://search.cpan.org/perldoc?D::P::SimpleCRUD" title="CPAN D::P::SimpleCRUD" 
target="_blank">D::P::SimpleCRUD</a> setting the quote_char param to a backtick, which is good for MySQL and SQLite, but not so much for PostgreSQL.  The code in <a href="http://search.cpan.org/perldoc?D::P::Database" title="CPAN D::P::Database" 
target="_blank">D::P::Database</a> uses the quote() / quote_identifer() methods provided by DBI, so should Do The Right Thing for any DBI-supported database engine.)</p>
<p>Also released is version 1.24 of <a href="http://search.cpan.org/dist/Dancer-Plugin-Database"><a href="http://search.cpan.org/perldoc?Dancer::Plugin::Database" title="CPAN Dancer::Plugin::Database" 
target="_blank">Dancer::Plugin::Database</a></a>, fixing a bug with the log_queries setting reported today on IRC by Martin P Evans (mpe) &#8211; thanks Martin!</p>
<p>As soon as time permits, I intend to add more features and refinement to <a href="http://search.cpan.org/dist/Dancer-Plugin-SimpleCRUD"><a href="http://search.cpan.org/perldoc?Dancer::Plugin::SimpleCRUD" title="CPAN Dancer::Plugin::SimpleCRUD" 
target="_blank">Dancer::Plugin::SimpleCRUD</a></a> to make it even more useful.  Any contributions would be very welcome indeed &#8211; you can fork the <a href="https://github.com/bigpresh/Dancer-Plugin-SimpleCRUD"><a href="http://search.cpan.org/perldoc?Dancer::Plugin::SimpleCRUD" title="CPAN Dancer::Plugin::SimpleCRUD" 
target="_blank">Dancer::Plugin::SimpleCRUD</a> repository on GitHub</a> and submit pull requests, or contact me with patches.</p>
<p>(You can also find <a href="https://github.com/bigpresh/Dancer-Plugin-Database"><a href="http://search.cpan.org/perldoc?Dancer::Plugin::Database" title="CPAN Dancer::Plugin::Database" 
target="_blank">Dancer::Plugin::Database</a> on GitHub</a>, and if you&#8217;re interested in my other projects or &#8220;following&#8221; me, see my <a href="https://github.com/bigpresh">GitHub profile</a>.)</p>
]]></description>
		<wfw:commentRss>http://www.preshweb.co.uk/2011/05/dancer-plugins-simplecrud-0-03-and-database-1-24/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

