<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Perl Hacks</title>
    <link rel="alternate" type="text/html" href="http://perlhacks.com/" />
    <link rel="self" type="application/atom+xml" href="http://perlhacks.com/atom.xml" />
    <id>tag:perlhacks.com,2009-05-18://1</id>
    <updated>2010-10-01T07:34:04Z</updated>
    <subtitle>Just another Perl Blog</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 5.02</generator>

    <entry>
        <title>Too Easy or Too Hard</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/09/too-easy-or-too-hard.php" />
        <id>tag:perlhacks.com,2010://1.67</id>
        <published>2010-09-29T18:28:44Z</published>
        <updated>2010-10-01T07:34:04Z</updated>
        <summary>We hear a lot of people complaining that programming in Perl is too difficult, but I think that a lot of these problems stem from people making the opposite assumption - that writing Perl is easier than it actually is....</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Programming" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<p>We hear a lot of people complaining that programming in Perl is too difficult, but I think that a lot of these problems stem from people making the opposite assumption - that writing Perl is easier than it actually is. Let me share a couple of examples. I've lightly disguised the companies in question - so if you think you recognise a place where we've worked together you're probably wrong.</p>
<p>In the first, I'm working for a global organisation. Most of their bespoke software is written in Java, but (like pretty much every company) there are a few Perl programs running vital parts of the infrastructure. This company have also outsourced a lot of their maintenance work to another company in India. This Indian company has dozens of people who are dedicated to working on my client's systems. But they are Java programmers and every once in while they need to do some work on a Perl program.</p>
<p>This company has an internal IRC network and there's a Perl channel which I keep half an eye on whilst getting on with my work (which is maintaining a huge Perl program). A few times a day one of these Java programmers turns up on the Perl channel explaining a problem they have to solve in a Perl program and asking for help. In pretty much every case, the problem boils down to the Java programmer having major misconceptions about how Perl works. Perl programmers on the channel try their hardest to to help, but it's often a frustrating experience. Usually the correct answer is "go away and read Learning Perl and Intermediate Perl, then you will understand how the code works". But these programmers don't have the time to do that. They need this task finished in an hour. Often it's a task that could be easily achieved in an hour - but only after you've done the groundwork of understanding how Perl works.</p>
<p>The problem this company had was that Perl wasn't seen as being as important as it actually was. People in the Indian company saw it as a "scripting language" that any of their (no doubt highly qualified) Java programmers would be able to use without any preparation or training. That's clearly not the case.</p>
<p>But, I hear you say, that's not fair. Perl and Java are really different languages. I'm glad you pointed that out as it's a nice link to my second example.</p>
<p>In this example, I'm working for a dotcom company London. Like so many dotcom companies they have a Perl codebase that was thrown together five years ago in a couple of months by people who didn't really know what they were doing. This company has the added problem that they are finding it hard to recruit people with Perl experience. So they start recruiting people with experience of languages like Python and Ruby in the belief that these languages are so similar that the programming skills are completely interchangeable.</p>
<p>And, of course, Perl, Ruby and Python are all a lot closer to each other than they are to languages like Java. But there are differences. Important differences that aren't just syntactic. I can read Python and Ruby just fine. But if I got a job where I had to write a lot of either of those languages, I wouldn't assume that I could just pick it up by osmosis, I'd get a book and read about the language. If I was going permanent at the company, I might even suggest that they send me on a training course.</p>
<p>Conversations with these non-Perl programmers often took a predictable course. They'd start complaining that the code was hard to read. This was hard to counter as a lot of the code was horrible. But if you pointed out some of the newer and better code, they wouldn't see the improvement. They would insist that somehow Ruby or Python code was inherently easier to read than Perl code. I'd try to point out that Perl programmers find Perl code as easy to read as Python (or Ruby) programmers find Python (or Ruby).</p>
<p>So there seems to be this perception that Perl should be as easy to read as Random Programmer's favourite language. And I don't understand why that is. Just because I've been programming for almost thirty years, I don't expect to be able to program in any language I happen to look at - well, certainly not well enough to be paid for doing it.</p>
<p>I'm not sure what we can do to counter this misconception. I think it probably stems from the late 90s when everyone was writing Perl. And if everyone is doing something, then it must be really easy.Of course, most people were writing really horrible Perl because Perl isn't as easy as they thought it was.</p>
<p>Not sure it's possible to sum this up in a simple marketing slogan. "Perl is Easy (but not as easy as you think)".</p>]]>
            
        </content>
    </entry>

    <entry>
        <title>Marketing Perl</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/09/marketing-perl-1.php" />
        <id>tag:perlhacks.com,2010://1.66</id>
        <published>2010-09-19T14:05:56Z</published>
        <updated>2010-09-20T08:00:44Z</updated>
        <summary>Sometimes people ask me why Perl marketing is so important. This morning I came across an excellent example of the kind of thing that we&apos;re trying to counter. In the current issue of Linux Format, there&apos;s an article about building...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Marketing" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="cgi" label="cgi" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="linux" label="linux" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="linuxformat" label="linux format" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="marketing" label="marketing" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<p>Sometimes people ask me why Perl marketing is so important. This morning I came across an excellent example of the kind of thing that we're trying to counter.</p>
<p>In the current issue of <a href="http://linuxformat.co.uk/">Linux Format</a>, there's an article about building a Twitter client in the bash shell. It's written by <a href="http://twitter.com/evilnick">Nick Veitch</a> - who seems to dislike Perl a bit. In the article he wants to URL encode a string and can't find an easy way to do it in bash. He writes:</p>
<blockquote><p>However, the compromise I've found for this isn't too bad (props to <a href="http://stakface.com/nuggets">http://stakface.com/nuggets</a>). It uses Perl and, like everything in that language, it looks like you ought to sacrifice a goat or something before you run it.</p>
<code>perl -p -e 's/([^A-Za-z0-9.-~])/sprintf("%%%02X", ord($1))/seg'</code>
</blockquote>
<p>It's not clear to me which part of the Perl make him want to start sacrificing goats. Is it the s/// syntax that Perl borrowed from sed? Perhaps it's the regular expression syntax that Perl shares with pretty much any language with regex support. Or maybe it's the sprintf function that Perl borrowed from C and that many other languages (including bash) support with a pretty similar syntax.</p>
<p>Of course I'm not saying that Perl doesn't have some grungy corners in its syntax. But the three pieces of syntax used in this code fragment look to me like things that should be understood easily by just about anyone with experience of programming in the Unix environment.</p>
<p>And if this code is so hard to understand, why use it? I don't know what Nick's programming language of choice is, but couldn't you do exactly the same thing in Python, Ruby or PHP? I can't believe that Perl is the only language that is so powerful. And I'd be very surprised if the same code didn't look very similar in many other languages.</p>
<p>So why the unnecessary little dig at Perl?</p>
<p>Of course, it's clear that Perl isn't a language that Nick is particularly familiar with (neither, indeed, is the person who he took the solution from). Anyone who knew Perl would realise that Perl's standard distribution includes the CGI module which contains an escape function which does exactly what Nick wanted - without exposing the programmer to all of that scary syntax. I would write Nick's code something like this:</p>
<code>perl -MCGI=escape -e'print escape "@ARGV"'</code>
<p>There are a lot of people out there with really strange ideas about Perl. People who don't bother to find out the best ways to do things in Perl. And having widely-read Linux magazines printing snipe comments about Perl does no-one any good at all.</p>
<p>This is why I think that Perl marketing is important. We need to reach the people outside of the echo chamber and tell them that Perl isn't the outdated, hard-to-use language that they are being told that it is.</p><p><b>Update:</b> I should have pointed out that I've sent an abbreviated version of this to Linux Format. Hopefully it'll be published in the next issue. And I'm considering proposing a series of articles on Perl to them.<br /></p>]]>
            
        </content>
    </entry>

    <entry>
        <title>Modern Perl at OpenTech</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/09/modern-perl-at-opentech-1.php" />
        <id>tag:perlhacks.com,2010://1.65</id>
        <published>2010-09-12T10:10:43Z</published>
        <updated>2010-09-30T13:44:59Z</updated>
        <summary> Modern PerlView more presentations from Dave Cross. OpenTech is an annual one-day conference in London where geeks get together and share information about cool things they are doing with technology. The emphasis is on projects that improve society in...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Speaking" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="2010" label="2010" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="modernperl" label="modern perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="opentech" label="opentech" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="speaking" label="speaking" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[ <div style="width: 425px;" id="__ss_5182978"><strong style="margin: 12px 0pt 4px; display: block;"><a href="http://www.slideshare.net/davorg/modern-perl-5182978" title="Modern Perl">Modern Perl</a></strong><object id="__sse5182978" height="355" width="425"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=modern-perl-100912020748-phpapp02&amp;stripped_title=modern-perl-5182978" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed name="__sse5182978" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=modern-perl-100912020748-phpapp02&amp;stripped_title=modern-perl-5182978" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="355" width="425"></object><div style="padding: 5px 0pt 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/davorg">Dave Cross</a>.</div></div>
<script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;c2=7400849&amp;c3=1&amp;c4=&amp;c5=&amp;c6="></script>
<p><a href="http://lanyrd.com/series/opentech/">OpenTech</a> is an annual one-day conference in London where geeks get together and share information about cool things they are doing with technology. The emphasis is on projects that improve society in some way so you'll see a lot of talks about really interesting projects. Usually the talks concentrate more on the user aspects of the projects and it's rare to hear very much detail about the underlying technologies.</p>
<p>I was therefore slightly surprised to be invited to invited to give a talk about Modern Perl at this year's conference. But I grasped the opportunity to speak to a room of geeks who might not be keeping up to date with Perl technology.</p>
<p>The slides are now <a href="http://www.slideshare.net/davorg/modern-perl-5182978">on SlideShare</a>. Bear in mind that I was aiming at a non-Perly crowd and that I only had twenty minutes - so it's possible that I didn't have time to cover your favourite Modenr Perl project.</p><script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;c2=7400849&amp;c3=1&amp;c4=&amp;c5=&amp;c6="></script><script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;c2=7400849&amp;c3=1&amp;c4=&amp;c5=&amp;c6="></script>]]>
            
        </content>
    </entry>

    <entry>
        <title>Net::Songkick</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/08/netsongkick.php" />
        <id>tag:perlhacks.com,2010://1.64</id>
        <published>2010-08-25T20:22:27Z</published>
        <updated>2010-09-30T13:45:47Z</updated>
        <summary>Sometimes it&apos;s good to just take a new idea and hack on it for a couple of hours to see what happens. That&apos;s what I&apos;ve done this evening. I&apos;ve been using Songkick for a while. Songkick is a web site...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<p>Sometimes it's good to just take a new idea and hack on it for a couple of hours to see what happens. That's what I've done this evening.</p>
<p>I've been using <a href="http://www.songkick.com/">Songkick</a> for a while. Songkick is a web site that tracks users' attendance at gigs. I've been <a href="http://www.songkick.com/users/davorg">tracking the gigs</a> I've been going to as well as trying to fill in over thirty years of old gigs.</p>
<p>I've known for some time that Songkick has an API, but until yesterday the API has been for invited partners only. But yesterday on Get Satisfaction they <a href="http://getsatisfaction.com/songkick/topics/external_api_for_developers#reply_3300660">announced that it was now public</a>.</p>
<p>The <a href="http://developer.songkick.com/">public API</a> doesn't do that much yet. There are only four documented calls. But it's already useful and I'm sure it will gain more functionality quickly.</p>
<p>And this evening I've spent some time writing a very simple <a href="http://developer.songkick.com/">Net::Songkick</a> module. This is really just a proof of concept, but I've got big plans for improving it. And I can already write a useful program like this:</p>

<pre class='brush: pl'>
#!/usr/bin/perl

use strict;
use warnings;

use XML::LibXML;
use Net::Songkick;

my $user = shift || 'davorg';
my $sk = Net::Songkick-&gt;new({
  api_key =&gt; $ENV{SONGKICK_API_KEY}
});

my $xml = $sk-&gt;get_upcoming_events({
  user =&gt; $user,
});

my $xp = XML::LibXML-&gt;new-&gt;parse_string($xml);

foreach ($xp-&gt;findnodes('//event/@displayName')) {
  print $_-&gt;to_literal, &quot;\n&quot;;
}
</pre>

<p>If you have any interest in gigs then I highly recommend Songkick to you. And if you like attending gigs and hacking Perl (although not necessarily at the same time) then why not give Net::Songkick a try. All you'll need is an <a href="http://www.songkick.com/api_keys/index">API key</a> from Songkick.</p>

<p>There's a <a href="hhttp://github.com/davorg/net-songkick/">Github repository</a> too; if you feel like hacking on it...</p>
]]>
            
        </content>
    </entry>

    <entry>
        <title>Learning About Traits</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/08/learning-about-traits.php" />
        <id>tag:perlhacks.com,2010://1.63</id>
        <published>2010-08-23T08:13:51Z</published>
        <updated>2010-08-23T08:41:53Z</updated>
        <summary>I&apos;ve been teaching basic Moose in my training courses for several years now. And, as I&apos;ve mentioned before, I&apos;ve been slowly converting some of my CPAN modules to use Moose. But there are still bits of Moose that I haven&apos;t...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="cpanperlanetmoosetraits" label="cpan perlanet moose traits" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[I've been teaching basic Moose in my training courses for several years now. And, as I've <a href="http://perlhacks.com/2009/09/moose-or-no-moose.php">mentioned before</a>, I've been slowly converting some of my CPAN modules to use Moose. But there are still bits of Moose that I haven't really needed to get to grips with.<div><br /></div><div>One such area is Moose's support for Traits. Oh, I knew vaguely what they were and I understood why you might use them. But I'd never implemented a system using traits, so my knowledge about how you'd actually use them was a bit shaky to say the least.</div><div><br /></div><div>But over the last few days I've learned quite a lot about how to use traits. And I've had to learn it pretty quickly.</div><div><br /></div><div>It all started a few weeks ago when I got a github pull request from&nbsp;<a href="http://github.com/ocharles">Oliver Charles</a>. Oliver had taken a fork of my <a href="http://github.com/ocharles/perlanet">Perlanet repository</a> and had massively refactored the codebase so that all the clever bits were implemented as traits.</div><div><br /></div><div>What this means is that the core Perlanet code is pretty dumb. In order to do anything really useful with it to need to add in some traits. <a href="http://github.com/davorg/perlanet/tree/master/lib/Perlanet/Trait/">There are traits</a> to read the configuration from a YAML file, traits to carry out various kinds of cleaning of the input and a trait to produce the output using the Template Toolkit. There are also traits to handle caching and OPML generation. All in all it makes the code far nicer to work on.</div><div><br /></div><div>Oh, and there's a Perlanet::Simple module which uses all of the traits required to implement the Perlanet behaviour that users currently expect.</div><div><br /></div><div>There were a few problems with Oliver's initial version. Some of the dependencies weren't quite right. But we soon fixed that and last week I finally released Perlanet 0.47 which implemented these changes.</div><div><br /></div><div>Then I installed it on the server which hosts most of <a href="http://theplanetarium.org/">my planets</a>. And everything broke.</div><div><br /></div><div>So I've spent a lot of the weekend fixing these issues. Part of it was that Oliver's changes assumed some configuration file changes that I hadn't implemented. I changed his changes so that they worked with the existing configuration settings (we don't want users having to change configuration files unnecessarily). Other changes were harder to track down. I particularly enjoyed one where no feeds were fetched unless the user turned on OPML support. I learned a lot about how traits worked by tracking that one down.</div><div><br /></div><div>But it all seems to be fixed now. <a href="http://search.cpan.org/~davecross/Perlanet-0.51/">Perlanet version 0.51</a> is available on CPAN and it will hopefully be a lot easier to customise to your needs. I hope we'll see a number of other Perlanet traits appearing over the next few months.</div><div><br /></div><div>And, most importantly, I've learnt a lot about traits. I think I understand them now.</div><div><br /></div><div>If you want to learn traits, I can highly recommend asking someone to implement traits in one of your projects. And it's even better if they do it in a slightly broken way so that you need to debug it.</div>]]>
            
        </content>
    </entry>

    <entry>
        <title>Perl Vogue</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/08/perl-vogue.php" />
        <id>tag:perlhacks.com,2010://1.62</id>
        <published>2010-08-05T08:09:08Z</published>
        <updated>2010-09-30T13:46:53Z</updated>
        <summary>I&apos;m at YAPC::EU in Pisa, so I&apos;m too busy having fun to write a long blog post about my new project - Perl Vogue. But I thought you might be interested in the lightning talk that I used to announce...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Speaking" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="cpan" label="cpan" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="fashion" label="fashion" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="perlvogue" label="perl vogue" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="pisa" label="pisa" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="talks" label="talks" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapc" label="yapc" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapceu10" label="yapceu10" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<p>I'm at <a href="http://conferences.yapceurope.org/ye2010/">YAPC::EU</a> in Pisa, so I'm too busy having fun to write a long blog post about my new project - <a href="http://perlvogue.com/">Perl Vogue</a>. But I thought you might be interested in the lightning talk that I used to announce it yesterday.</p>

<div style="width: 425px;" id="__ss_4905804"><strong style="margin: 12px 0pt 4px; display: block;"><a href="http://www.slideshare.net/davorg/perl-vogue" title="Perl Vogue">Perl Vogue</a></strong><object id="__sse4905804" height="355" width="425"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=perl-vogue-100805025044-phpapp02&amp;stripped_title=perl-vogue" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed name="__sse4905804" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=perl-vogue-100805025044-phpapp02&amp;stripped_title=perl-vogue" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="355" width="425"></object><div style="padding: 5px 0pt 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/davorg">Dave Cross</a>.</div></div>

<p>More detail when I get back from Italy in ten days.</p>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=69e94266-a03d-4072-9295-4957ce018097" alt="Enhanced by Zemanta" /></a></div><script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;c2=7400849&amp;c3=1&amp;c4=&amp;c5=&amp;c6="></script>]]>
            
        </content>
    </entry>

    <entry>
        <title>Modern Perl at OpenTech</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/07/modern-perl-at-opentech.php" />
        <id>tag:perlhacks.com,2010://1.61</id>
        <published>2010-07-06T08:13:51Z</published>
        <updated>2010-07-06T08:21:20Z</updated>
        <summary>I mentioned a few months ago that I&apos;d be running an &quot;Introduction to Modern Perl&quot; training course at YAPC::Europe this year. But in the interests of speaking outside of the Perl community as much as possible, I&apos;m also going to...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Speaking" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="2010" label="2010" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="conferences" label="conferences" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="modernperl" label="modern perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="opentech" label="opentech" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="speaking" label="speaking" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[I <a href="http://perlhacks.com/2010/04/training-update.php">mentioned a few months ago</a> that I'd be running an <a href="http://conferences.yapceurope.org/ye2010/training_courses.html">"Introduction to Modern Perl"</a> training course at YAPC::Europe this year. But in the interests of speaking outside of the Perl community as much as possible, I'm also going to be giving a&nbsp;slightly&nbsp;different version of that course at the <a href="http://www.ukuug.org/events/opentech2010/schedule/">OpenTech conference</a> in London in September.<div><br /></div><div>I say "slightly different", but that's a bit of an understatement. The original training course runs for six hours. The OpenTech talk is twenty minutes. But hopefully that will be long enough to introduce some people to many of the interesting things that are going on in the Perl world.</div><div><br /></div><div>It you're going to be in London in September, then the OpenTech conference is always a lot of fun. I highly recommend that you come along. It's cheap too - just a fiver on the door.</div>]]>
            
        </content>
    </entry>

    <entry>
        <title>YAPC::Europe Talks Accepted</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/06/yapceurope-talks-accepted.php" />
        <id>tag:perlhacks.com,2010://1.60</id>
        <published>2010-06-23T07:49:25Z</published>
        <updated>2010-06-23T08:06:08Z</updated>
        <summary>The YAPC::Europe organisers said that they would tell speakers which talks had been accepted on July 1st. Well, it seems that the excitement was too much for them and they decided to do it a week earlier. Yesterday I got...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Conferences" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="conferences" label="conferences" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="speaking" label="speaking" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapc" label="yapc" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapceu10" label="yapceu10" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapceurope" label="yapceurope" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<p>The YAPC::Europe organisers said that they would tell speakers which talks had been accepted on July 1st. Well, it seems that the excitement was too much for them and they decided to do it a week earlier. Yesterday I got email telling me that some of my talks had been accepted and the <a href="http://conferences.yapceurope.org/ye2010/talks">list of accepted talks</a> is now on the web site. As always, it looks like a really interesting conference.</p>
<p>I've had two twenty-minute talks accepted:</p>
<blockquote><p><a href="http://conferences.yapceurope.org/ye2010/talk/2867">
The Perl Community</a><br />
The Perl community is a complex and interesting city. I've been exploring it for almost fifteen years and I'm not sure that I've been to every corner of it.</p>
<p>In this talk I'll attempt to guide you round some of the more interesting and useful parts of the Perl community. I'll point out some ancient monuments, some nice new areas and warn you about some places where you really shouldn't walk alone after dark.</p></blockquote>
<blockquote><p><a href="http://conferences.yapceurope.org/ye2010/talk/2866">Things I Learned From Having Users?</a><br />
When I first started releasing modules to CPAN it was great. I released modules that no-one used. I could release new versions as and when I wanted to.</p>
<p>Then people started using a couple of my modules. I started to get email about them. Suddenly my modules were no longer just for me. I had to deal with users.</p>
<p>In this talk I'll discuss how having users effects the way that you develop and release software. I'll also look at a few ways to keep on top of things.</p></blockquote>
<p>I'm also doing my first lightning talk for several years:</p>
 <blockquote><p><a href="http://conferences.yapceurope.org/ye2010/talk/2870">?Perl Vogue?</a><br />
</p><p>You might not believe it to look at us, but the Perl community is a deeply fashionable place. If you're not using the currently fashionable modules in your code then people will be sneering at you behind your back.</p>
<p>Join Dave Cross for a quick review of the history of Perl fashion.</p>
</blockquote>
<p>See you in Pisa.</p>]]>
            
        </content>
    </entry>

    <entry>
        <title>YAPC::Europe Talks</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/06/yapceurope-talks.php" />
        <id>tag:perlhacks.com,2010://1.59</id>
        <published>2010-06-11T15:05:54Z</published>
        <updated>2010-06-11T15:13:45Z</updated>
        <summary>The Call for Papers for YAPC::Europe closes in four days. If you&apos;re thinking of giving a talk in Pisa then this weekend would be a very good time to give it some serious thought. I proposed four talks last night....</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Conferences" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="talks" label="talks" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapc" label="yapc" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapceu10" label="yapceu10" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapceurope" label="yapceurope" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<p>The <a href="http://conferences.yapceurope.org/ye2010/">Call for Papers</a> for YAPC::Europe closes in four days. If you're thinking of giving a talk in Pisa then this weekend would be a very good time to give it some serious thought.</p>
<p>I proposed four talks last night. I'm hoping that the organisers won't choose more than two of them, but I like to give them a bit of choice. The titles are as follows:</p>
<ul>
<li>The Perl Community</li>
<li>Web Services for Fun and Profit</li>
<li>Things I Learned From Having Users</li>
<li>Perlanet Update</li>
</ul>
<p>I've also submitted a proposal for a lightning talk called "Perl Fashion". It's been several years since I've given a lightning talk, so that'll be an interesting experience.</p>
<p>Don't forget that there are also <a href="http://conferences.yapceurope.org/ye2010/training_courses.html">training courses</a> (including my course on Modern Perl).</p>
<p>Looking forward to the conference very much. Hope to see some of you there.</p>]]>
            
        </content>
    </entry>

    <entry>
        <title>How Not to Ask a Question</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/06/how-not-to-ask-a-question.php" />
        <id>tag:perlhacks.com,2010://1.58</id>
        <published>2010-06-10T12:34:34Z</published>
        <updated>2010-06-10T13:17:06Z</updated>
        <summary>I received this email last week. I often get random email from people I don&apos;t know asking for help with Perl problems and I&apos;m happy to help whenever I can (although I always point our that Perl Monks is going...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Weirdness" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="supportmvcframeworksetiquette" label="support mvc frameworks etiquette" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<p>I received this email last week. I often get random email from people I don't know asking for help with Perl problems and I'm happy to help whenever I can (although I always point our that <a href="http://perlmonks.org/">Perl Monks</a> is going to get better answers in less time).</p>
<p>But if you're going to ask random strangers for help, you should probably make a bit more effort than this person did. I've reformatted it and corrected the English.</p>

<blockquote><p>Hello sir,</p>

<p>I am new developer in perl scripting language using MVC Frame works, my doubt is how to write below query in MVC.</p>

<p></p><pre>$query = "select belarc_update_dt
           from   Device
           where  belarc_update_dt  &gt;  $expiry_date
           AND    belarc_update_dt &lt;= $current_date
           AND    (scrapped_on &gt; $current_date
                   OR scrapped_on = '0000-00-00')";</pre><p></p>

<p>the above query how to write in mvc frameork can we please help me sir,</p>

<p>Thanks and Regards</p></blockquote>

<p>How would you reply to mail like that?</p>


<p><b>Update:</b> I asked which MVC framework he was using. He replied:</p>

<blockquote>I am using CGI::Carp 'fatalsToBrowser' with linux shell.</blockquote>

<p>At that point I gave up.</p>]]>
            
        </content>
    </entry>

    <entry>
        <title>Ironman and XML::Feed</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/04/ironman-and-xmlfeed.php" />
        <id>tag:perlhacks.com,2010://1.57</id>
        <published>2010-04-26T08:02:04Z</published>
        <updated>2010-04-26T08:09:07Z</updated>
        <summary>Sam Graham complains that since the Ironman feed switched to using Perlanet, the entries have been &quot;mangled&quot;. By that he means that in some cases any HTML in feed entries is lost.I think they&apos;re running up against this bug in...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="cpan" label="cpan" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="ironman" label="ironman" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="perlanet" label="perlanet" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="xmlfeed" label="xml::feed" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<a href="http://www.illusori.co.uk/perl/2010/04/25/mangled_ironman_feed.html">Sam Graham complains</a> that since the <a href="http://www.shadowcat.co.uk/blog/matt-s-trout/exciting-days-ahead/">Ironman feed switched to using Perlanet</a>, the entries have been "mangled". By that he means that in some cases any HTML in feed entries is lost.<div><br /></div><div>I think they're running up against <a href="https://rt.cpan.org/Ticket/Display.html?id=44899">this bug in XML::Feed</a> (which is one of the modules that Perlanet uses to process the feeds it subscribes to). There's a patch in the bug report that I've applied to my local installation of XML::Feed and it seems to have fixed the problem.</div><div><br /></div><div>Until the author releases a new version of XML::Feed that includes this patch, I recommend that anyone using XML::Feed (and that includes everyone using Perlanet) applies the patch for themselves.</div>]]>
            
        </content>
    </entry>

    <entry>
        <title>More RPM Stuff</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/04/more-rpm-stuff.php" />
        <id>tag:perlhacks.com,2010://1.56</id>
        <published>2010-04-25T16:02:17Z</published>
        <updated>2010-04-28T16:17:59Z</updated>
        <summary>It&apos;s been a while since I wrote anything here. if anyone is keeping score I&apos;ve probably failed the Iron Man challenge of posting something every ten days.Don&apos;t have much to add here either but I thought some of you might...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="CPAN" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="cpan" label="cpan" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="fedora" label="fedora" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="github" label="github" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="rpm" label="rpm" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[It's been a while since I wrote anything here. if anyone is keeping score I've probably failed the Iron Man challenge of posting something every ten days.<br /><br />Don't have much to add here either but I thought some of you might be interested in a quick tweak I made to my <a href="http://spreadsheets.google.com/pub?key=tVoSlaYU1SGovwwjV0fqt9Q&amp;output=html">spreadsheet of CPAN RPMs</a> available for Fedora. It now lists all of the RPMs available across all of the repositories that I use and shows you which version of the module is available. I've also added the current CPAN version for all of these modules.<br /><br />This gives me the information I need to do a few things that I've wanted to do for a while. In particular I should be able to script the automatic removal of RPMs from my repository when the official Fedora repository catches up with the version I'm carrying. I can also easily identify CPAN modules where the latest Fedora version (from any of the repositories) is lagging behind the CPAN version.<br /><br />As always, <a href="http://github.com/davorg/rpm_stuff">the code is available on Github</a> and patches are very welcome.<br /><div><br /></div><div><b>Update:</b> And here's <a href="http://spreadsheets.google.com/pub?key=tebslxjHQcYVG4BR0qHOeLw&amp;output=html">another spreadsheet</a> covering CPAN RPMs available for Centos.</div>]]>
            
        </content>
    </entry>

    <entry>
        <title>Training Update</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/04/training-update.php" />
        <id>tag:perlhacks.com,2010://1.55</id>
        <published>2010-04-01T10:14:23Z</published>
        <updated>2010-04-01T10:24:05Z</updated>
        <summary>The training courses for this summer&apos;s YAPC in Pisa have been announced. And my course on Modern Perl has been chosen. It&apos;s a one-day course on August 2th (just before the conference). It costs � 180. You&apos;ll be able to...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Training" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="conferences" label="conferences" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="modernperl" label="modern perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="training" label="training" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapc" label="yapc" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapceu10" label="yapceu10" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapceurope" label="yapceurope" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[<p>The <a href="http://conferences.yapceurope.org/ye2010/training_courses.html">training courses for this summer's YAPC</a> in Pisa have been announced. And my course on Modern Perl has been chosen. It's a one-day course on August 2th (just before the conference). It costs � 180. You'll be able to book once the payments system on the conference web site goes live.</p>
<p>Here's the description of the course from the YAPC site:</p>
<blockquote><p>This course introduces the major building blocks of modern Perl. We'll be looking at a number of CPAN modules that can make your Perl programming life far more productive.</p>
<p>The major tools that we will cover will be:</p>
<ul><li>Template Toolkit</li>
<li>DBIx::Class</li>
<li>Moose</li>
<li>Catalyst</li>
<li>Plack</li></ul>
<p>We'll also look at some other modules including autodie, DateTime and TryCatch.</p></blockquote>
<p>There are several other good courses running both before and after the conference. I'm sure there'll be something that you'll find interesting.</p><p>N.B: This is not an April Fool's joke!</p>]]>
            
        </content>
    </entry>

    <entry>
        <title>Perl Books</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/03/perl-books.php" />
        <id>tag:perlhacks.com,2010://1.54</id>
        <published>2010-03-30T07:27:49Z</published>
        <updated>2010-03-30T07:51:23Z</updated>
        <summary>Those of you who have been following my work for some time might remember that many years ago I took some interest in Perl books. I don&apos;t mean the kind of books that we all read (or, even write) with...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Books" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="books" label="books" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="foyles" label="foyles" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="perlbooks" label="perl books" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[Those of you who have been following my work for some time might remember that many years ago I took some interest in <a href="http://use.perl.org/~davorg/journal/340">Perl books</a>. I don't mean the kind of books that we all read (or, even write) with animals on the cover. I mean the kinds of terrible Perl books that at one stage seemed to take up over 90% of the space given over to Perl books in most bookshops. They had brightly coloured covers and made unlikely claims about how good you would be with Perl after an unfeasibly short period of time.<div><br /></div><div>They all seemed to be written by people who didn't actually know anything about Perl and they were full of the most atrocious Perl code that I've ever seen. Of course they were all not just about Perl but were about CGI programming with Perl (as that's what everyone wanted to use Perl for ten years ago). It was easy to tell the quality of these books from the index. You just looked for mentions of "use strict", "use warnings" or CGI.pm. Most books ignored them completely. At the time <a href="http://twitter.com/Schwern">Schwern</a> had a "litmus test" for the quality of Perl books. It was list of bullet points that you could use to easily calculate how bad a Perl book was. I seems to have dropped off the internet at some point in the last ten years.</div><div><br /></div><div>Last weekend I was in the centre of London and I went into a couple of large book shops that I haven't been to for some time. And it looks to me as though this problem has finally gone away. Looking at the Perl section in <a href="http://www.foyles.co.uk/">Foyles</a>, for example, I saw a very few dodgy Perl books. Of course, there were far fewer Perl books of any quality than there would have been five or six years ago, but the ones that were left were pretty much all decent books.</div><div><br /></div><div>My initial thought was that this was just another sign that Perl has lost the battle for the low-end web development market. People who want to hack up a web site no longer even consider using CGI programs written in Perl. These days those people would all use PHP. But it seemed to me that there weren't many "Learn PHP in 24 Hours" books on the shelves either. So perhaps the low-end web development market doesn't exist any more. Or, at least, perhaps it's not big enough to make it profitable enough for publishers.</div><div><br /></div><div>I'll admit that my sample wasn't particularly big. And Foyles isn't exactly your average book shop. It caters for the higher end of the book-buying market. I wanted to test my hypothesis by looking at the computer books section in Borders over the road. But Borders has closed down. Another indication of the diminishing size of the book market.</div><div><br /></div><div>I'm going to take this investigation further. I'll check out the computer section in some lower-end book shops. But just to give myself some closure I'm going to declare my campaign against bad Perl books to be over. We won in the end. But it may be a slightly Pyrrhic victory.&nbsp;</div>]]>
            
        </content>
    </entry>

    <entry>
        <title>Training in Pisa</title>
        <link rel="alternate" type="text/html" href="http://perlhacks.com/2010/03/training-in-pisa.php" />
        <id>tag:perlhacks.com,2010://1.53</id>
        <published>2010-03-21T16:16:44Z</published>
        <updated>2010-03-21T16:26:33Z</updated>
        <summary>The YAPC::Europe organisers have put out a call for training courses. They want a number of courses to offer to attendees in the couple of days before the conference. The call closed yesterday and I expect they&apos;ll be announcing the...</summary>
        <author>
            <name>Dave Cross</name>
            
        </author>
    
        <category term="Training" scheme="http://www.sixapart.com/ns/types#category" />
    
    
        <category term="conferences" label="conferences" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="modernperl" label="modern perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="pisa" label="pisa" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="training" label="training" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <category term="yapceurope" label="yapceurope" scheme="http://www.sixapart.com/ns/types#tag" />
    
        <content type="html" xml:lang="en" xml:base="http://perlhacks.com/">
            <![CDATA[The YAPC::Europe organisers have put out a <a href="http://conferences.yapceurope.org/ye2010/call_for_training_courses.html">call for training courses</a>. They want a number of courses to offer to attendees in the couple of days before the conference. The call closed yesterday and I expect they'll be announcing the courses in a couple of weeks.<br /><br />I've given training courses at the last couple of YAPC::Europes so I've sent in a proposal for a course. I'm hoping to run a new course called "An Introduction to Modern Perl". In this course we'll be looking at some of the tools that form the basis of all modern Perl programming. This will include Template Toolkit, Moose, DBIx::Class, Catalyst and Plack.<br /><br />I hope that this sounds interesting to some of you and that you'll consider attending the course (if it gets accepted). Please keep an eye on the <a href="http://conferences.yapceurope.org/ye2010/call_for_training_courses.html">conference web site</a> to see when the courses are announced.<br /><br />And please consider holding off booking your travel and hotel until you've seen the selection of courses that will be offered before the conference.<br /><br />I suppose now I should start thinking about some talks to give at the conference.<br />]]>
            
        </content>
    </entry>

</feed>
