<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>The Cattle Grid</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/" />
    <link rel="self" type="application/atom+xml" href="http://www.cattlegrid.info/blog/atom.xml" />
    <id>tag:www.cattlegrid.info,2008-02-04:/blog//1</id>
    <updated>2009-06-24T12:50:21Z</updated>
    <subtitle>this empty space you call your home</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.23-en</generator>

<entry>
    <title>Possibile giornata su Moose con Dave Rolsky a Pisa in Ottobre 2009</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/06/possibile-giornata-su-moose-co.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.185</id>

    <published>2009-06-20T10:05:58Z</published>
    <updated>2009-06-24T12:50:21Z</updated>

    <summary>Perl.It sta cercando di organizzare, attorno all&apos;Italian Perl Workshop 2009, una giornata dedicata a Moose con Dave Rolsky. Tutti i dettagli sono disponibili qui: http://conferences.yapceurope.org/ipw2009/news/422 Perl.It is trying to organize, around the Italian Perl Workshop 2009, a day devoted to Moose with Dave Rolsky. All the details are available here: http://conferences.yapceurope.org/ipw2009/news/422...</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="ipw2009" label="ipw2009" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="italiano" label="italiano" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="moose" label="moose" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pisa" label="pisa" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rolsky" label="rolsky" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="workshop" label="workshop" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p>Perl.It sta cercando di organizzare, attorno all'Italian Perl Workshop 2009, una giornata dedicata a Moose con Dave Rolsky. Tutti i dettagli sono disponibili qui:</p>

<p><a href="http://conferences.yapceurope.org/ipw2009/news/422">http://conferences.yapceurope.org/ipw2009/news/422</a></p>

<p>Perl.It is trying to organize, around the Italian Perl Workshop 2009, a day devoted to Moose with Dave Rolsky. All the details are available here:</p>

<p><a href="http://conferences.yapceurope.org/ipw2009/news/422">http://conferences.yapceurope.org/ipw2009/news/422</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Italian Perl Workshop 2009</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/05/httpconferencesyapceuropeorgip.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.184</id>

    <published>2009-05-28T21:44:22Z</published>
    <updated>2009-05-28T21:50:51Z</updated>

    <summary> Da oggi sono ufficialmente aperti iscrizioni e call for paper per l&apos;edizione 2009 (la 5a) dell&apos;Italian Perl Workshop. L&apos;evento si terrà a Pisa, presso l&apos;Area di Ricerca del CNR, che è sponsor di questa edizione dell&apos;evento. Lo scorso anno si sono registrati numeri piuttosto interessanti per un workshop: oltre 30 talk (2 tracce per 2 giorni), 120 partecipanti, 20 sponsor, ospiti internazionali del calibro di Marcus Ramberg, Matt Trout, Tim Bunce e Rafael Garcia Suarez. Quest&apos;anno si punta a fare ancora meglio. Pertanto, il mio suggerimento è di non mancare assolutamente. Cliccate qui per visitare il sito del workshop...</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="conference" label="conference" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="italiano" label="italiano" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="italy" label="italy" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="workshop" label="workshop" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p><img src="http://conferences.yapceurope.org/ipw2009/images/bg_title_2009.png" alt="" class="right" style="float:right" /></p>

<p>Da oggi sono ufficialmente aperti <em>iscrizioni</em> e <em>call for paper</em> per l'edizione <strong>2009</strong> (la 5a) dell'<strong>Italian Perl Workshop</strong>. L'evento si terrà a Pisa, presso l'Area di Ricerca del <span class="caps">CNR, </span>che è sponsor di questa edizione dell'evento.</p>

<p>Lo scorso anno si sono registrati numeri piuttosto interessanti per un workshop: oltre 30 talk (2 tracce per 2 giorni), 120 partecipanti, 20 sponsor, ospiti internazionali del calibro di Marcus Ramberg, Matt Trout, Tim Bunce e Rafael Garcia Suarez.</p>

<p>Quest'anno si punta a fare ancora meglio. Pertanto, il mio suggerimento è di <strong>non mancare assolutamente</strong>. <a href="http://conferences.yapceurope.org/ipw2009/">Cliccate qui per visitare il sito del workshop</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>mod_perlite project seeks help</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/05/mod-perlite-project-seeks-help.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.183</id>

    <published>2009-05-06T07:46:05Z</published>
    <updated>2009-05-06T07:53:59Z</updated>

    <summary>mod_perlite is a very interesting project which aims to create a lightweight Perl module for Apache which can compete in the market range where PHP dominates. The project already has something which actually works, but which needs to be polished. If you can and want to help, take a look at the web site! Italian: per gli italiani, qui c&apos;è un articolo in merito....</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="mod_perl" label="mod_perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mod_perlite" label="mod_perlite" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="php" label="php" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="webdev" label="webdev" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p><a href="http://modperlite.org">mod_perlite</a> is a very interesting project which aims to create a lightweight Perl module for Apache which can compete in the market range where <span class="caps">PHP </span>dominates.</p>

<p>The project already has something which actually works, but which needs to be polished.  If you can and want to help, take a look at the web site!</p>

<p>Italian: per gli italiani, <a href="http://www.perl.it/blog/archives/000633.html">qui c'è un articolo in merito</a>.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Pocket Perl</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/05/pocket-perl.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.182</id>

    <published>2009-05-05T15:59:13Z</published>
    <updated>2009-05-05T17:06:37Z</updated>

    <summary> Pocket Perl Stefano Rodighiero Apogeo, 2008 ISBN: 978-88-503-2778-2 € 7.90 Rating: 4.5/5 Pocket Perl ha due virtù immediatamente riconoscibili: il prezzo contenuto ed il piccolo formato. Quest&apos;ultima caratteristica fornisce al novizio di Perl che si accinge alla lettura un&apos;idea di &quot;snellezza&quot; che lo spinge a cimentarsi nell&apos;impresa, a differenza di un testo di grosse dimensioni che potrebbe scoraggiare qualcuno. Va bene, siamo solo alle apparenze per ora. Il contenuto sarà ciò che ci si aspetta, e cioè una guida chiara, sufficientemente sintetica ma al contempo approfondita al punto giusto, per imparare Perl? Andiamo dunque ad indagare. Intelligentemente, il libro non parte subito parlando di Perl come linguaggio: la prima cosa che assomiglia ad un &quot;Hello, World&quot; è infatti a pagina 10 (e si tratta solo di un test per verificare che l&apos;installazione sia funzionante, l&apos;&quot;Hello World&quot; vero è a pagina 15). Prima di ciò viene sinteticamente indicato come installare l&apos;interprete, e soprattutto vengono messi in evidenza i punti di forza di Perl non relativi al linguaggio in sé. Anzitutto Rodighiero parla di CPAN, l&apos;immenso archivio di moduli Perl che è opportuno che ogni sviluppatore o aspirante tale impari ad utilizzare sin dall&apos;inizio; a questo scopo vengono fornite preziose indicazioni su come configurare CPAN, scaricare ed installare i moduli. Il secondo punto di forza svelato è la community: è altamente probabile che attorno a Perl ruoti una delle più interessanti comunità di sviluppatori nel mondo dei linguaggi di programmazione, e qui ne vengono indicati i principali &quot;punti di ingresso&quot; a livello italiano ed internazionale. Infine, viene presentato l&apos;immenso mondo della documentazione fornita con l&apos;interprete, vera e propria colonna portante della distribuzione. La trattazione relativa agli aspetti del linguaggio, pur trovandoci di fronte ad un libro tascabile, è alquanto articolata e rigorosa: si spazia dalle basi fino ad oggetti, regular expression e persino vere e proprie &quot;chicche&quot; come la trasformata di Schwartz. Il capitolo 8, inoltre, fornisce un&apos;interessante panoramica su quanto disponibile per quanto riguarda programmazione web, GUI, ed altre interazioni della propria applicazione con il mondo esterno - chiaramente, in questo caso, viene solo scalfita la superficie dei singoli argomenti. I contenuti sono piuttosto aggiornati, pertanto tutte le principali caratteristiche della versione 5.10 di perl vengono trattate. È un peccato che alcune tecnologie, come Moose (qui comunque accennato) e DBIx::Class (al posto del quale qui viene proposto il più rudimentale Class::DBI) si siano consolidate solo di recente e quindi non ci sia stata la chance di trattarle: andate dunque ad esplorarle su CPAN! Nel complesso, a mio avviso Pocket Perl copre una precedente lacuna nel panorama italiano relativo a Perl, che era la mancanza di un testo &quot;introduttivo ma non solo&quot;, chiaro e ben scritto, una guida che partisse dalle basi ma che fosse al contempo in grado di mostrare gli aspetti più interessanti del linguaggio, avvicinando nuovi programmatori a Perl. A livello di &quot;mancanze&quot;, per quanto mi riguarda ce n&apos;è solo una: il libro rimanda alla documentazione fornita con l&apos;interprete quanto riguarda la gestione di stringhe Unicode. Considerata l&apos;importanza dell&apos;argomento ed il fatto che la documentazione in linea è spesso nebulosa, sarebbe forse stato opportuno dedicarvi una sezione....</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="book" label="book" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="italiano" label="italiano" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="libro" label="libro" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="recensione" label="recensione" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="review" label="review" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p><img src="http://www.apogeonline.com/2008/libri/9788850327782/8850327782.gif" alt="" class="right" style="float:right" /></p>

<h3><a href="http://www.apogeonline.com/libri/9788850327782/scheda"><strong>Pocket Perl</strong></a><br />
<em>Stefano Rodighiero</em><br />
<a href="http://www.apogeonline.com/">Apogeo</a>, 2008<br />
<span class="caps">ISBN</span>: 978-88-503-2778-2<br />
€ 7.90</h3>

<p>Rating: <em>4.5/5</em></p>

<p>Pocket Perl ha due virtù immediatamente riconoscibili: il prezzo contenuto ed il piccolo formato. Quest'ultima caratteristica fornisce al novizio di Perl che si accinge alla lettura un'idea di "snellezza" che lo spinge a cimentarsi nell'impresa, a differenza di un testo di grosse dimensioni che potrebbe scoraggiare qualcuno.</p>

<p>Va bene, siamo solo alle apparenze per ora. Il contenuto sarà ciò che ci si aspetta, e cioè una guida chiara, sufficientemente sintetica ma al contempo approfondita al punto giusto, per imparare Perl? Andiamo dunque ad indagare.</p>

<p>Intelligentemente, il libro non parte subito parlando di Perl come linguaggio: la prima cosa che assomiglia ad un "Hello, World" è infatti a pagina 10 (e si tratta solo di un test per verificare che l'installazione sia funzionante, l'"Hello World" vero è a pagina 15). Prima di ciò viene sinteticamente indicato come installare l'interprete, e soprattutto vengono messi in evidenza i punti di forza di Perl <strong>non</strong> relativi al linguaggio in sé. Anzitutto Rodighiero parla di <span class="caps">CPAN, </span>l'immenso archivio di moduli Perl che è opportuno che ogni sviluppatore o aspirante tale impari ad utilizzare sin dall'inizio; a questo scopo vengono fornite preziose indicazioni su come configurare <span class="caps">CPAN, </span>scaricare ed installare i moduli. Il secondo punto di forza svelato è la community: è altamente probabile che attorno a Perl ruoti una delle più interessanti comunità di sviluppatori nel mondo dei linguaggi di programmazione, e qui ne vengono indicati i principali "punti di ingresso" a livello italiano ed internazionale. Infine, viene presentato l'immenso mondo della documentazione fornita con l'interprete, vera e propria colonna portante della distribuzione.</p>

<p>La trattazione relativa agli aspetti del linguaggio, pur trovandoci di fronte ad un libro tascabile, è alquanto articolata e rigorosa: si spazia dalle basi fino ad oggetti, regular expression e persino vere e proprie "chicche" come la trasformata di Schwartz. Il capitolo 8, inoltre, fornisce un'interessante panoramica su quanto disponibile per quanto riguarda programmazione web, <span class="caps">GUI, </span>ed altre interazioni della propria applicazione con il mondo esterno - chiaramente, in questo caso, viene solo scalfita la superficie dei singoli argomenti.</p>

<p>I contenuti sono piuttosto aggiornati, pertanto tutte le principali caratteristiche della versione 5.10 di perl vengono trattate.  È un peccato che alcune tecnologie, come <a href="http://search.cpan.org/perldoc?Moose">Moose</a> (qui comunque accennato) e <a href="http://search.cpan.org/perldoc?DBIx%3A%3AClass"><span class="caps">DBI</span>x::Class</a> (al posto del quale qui viene proposto il più rudimentale Class::DBI) si siano consolidate solo di recente e quindi non ci sia stata la chance di trattarle: andate dunque ad esplorarle su <span class="caps">CPAN</span>!</p>

<p>Nel complesso, a mio avviso Pocket Perl copre una precedente lacuna nel panorama italiano relativo a Perl, che era la mancanza di un testo "introduttivo ma non solo", chiaro e ben scritto, una guida che partisse dalle basi ma che fosse al contempo in grado di mostrare gli aspetti più interessanti del linguaggio, avvicinando nuovi programmatori a Perl. A livello di "mancanze", per quanto mi riguarda ce n'è solo una: il libro rimanda alla documentazione fornita con l'interprete quanto riguarda la gestione di stringhe Unicode. Considerata l'importanza dell'argomento ed il fatto che la documentazione in linea è spesso nebulosa, sarebbe forse stato opportuno dedicarvi una sezione.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Integrating MCImageImanager with a Perl web application</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/04/integrating-mcimageimanager-wi.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.181</id>

    <published>2009-04-07T19:04:51Z</published>
    <updated>2009-04-07T21:26:53Z</updated>

    <summary><![CDATA[After looking at the open source alternatives, I decided the price was worth to buy the MCIMageManager plugin for TinyMCE. This open source (LGPL) Rich Text Editor is probably the best out there: the great image upload plugin, developed by the same folks, is however not free - but definitely worth its money. The backend of MCImageManger is in PHP or .NET: I decided to stick with the PHP version, as my web server is on Unix, but still had to find out how to integrate it with my web application (which is in Perl) making sure only logged in users would be allowed to upload files. There are code examples for JSP, ASP Classic and several PHP configurations, but nothing related to Perl. So, I ported the authentication script - it was easy enough and here's the result. If you use Perl and you want to integrate authentication with the one of your system, you need to use ExternalAuthenticator in order to share sessions between Perl and PHP/.NET. It's not that difficult: since the Perl ExternalAuthenticator script is not provided, you can find one I wrote myself here. MCImageManager configuration File to edit is likely ''config.php''. If you use ''Web.config'', these instructions still apply. First of all, you need to enable the ''ExternalAuthenticator'': $mcImageManagerConfig['authenticator'] = &quot;ExternalAuthenticator&quot;; Scroll down a bit and you'll find the relevant configuration options for ''ExternalAuthenticator'': // ExternalAuthenticator config $mcImageManagerConfig['ExternalAuthenticator.external_auth_url'] = &quot;/manage/tinymce_auth.pl&quot;; $mcImageManagerConfig['ExternalAuthenticator.secret_key'] = &quot;TheKey&quot;; tinymce_auth.pl Put this file at the location you specified in ''config.php''. You need to edit some parth: the secret key and, of course, the part which verifies the user is authenticated. #!/usr/bin/perl use strict; use warnings; use CGI::Carp qw/fatalsToBrowser/; use CGI::Simple; use CGI::Session; use HTML::Entities; use Digest::MD5 qw/md5_hex/; # Must match the one in config.php my $secretKey = &quot;TheKey&quot;; my $q = CGI::Simple-&gt;new(); print $q-&gt;header( -type =&gt; 'text/html; charset=UTF-8', ); my $session = CGI::Session-&gt;new(); # See if session-id is OK if ( !$session-&gt;param('idadmin') =~ /^\d+$/ ) { print &quot;Not logged in&quot;; exit; } # Come configuration variables can be overridden here my %configuration = ( #'filesystem.rootpath' =&gt; '/some/path', #'filesystem.path' =&gt; '/some/path', ); my $data = ''; for my $cv (values %configuration) { $data .= $cv; } my $key = md5_hex($data . $secretKey); print '&lt;html&gt;'; print '&lt;body onload=&quot;document.forms[0].submit();&quot;&gt;'; print '&lt;form method=&quot;post&quot; action=&quot;' . encode_entities($q-&gt;param('return_url')) . '&quot;&gt;'; print '&lt;input type=&quot;hidden&quot; name=&quot;key&quot; value=&quot;'. encode_entities($key) . '&quot; /&gt;'; for my $ck (keys %configuration) { my $enc_ck = $ck; $enc_ck =~ s/\./_/g; print '&lt;input type=&quot;hidden&quot; name=&quot;' . encode_entities($enc_ck) . '&quot; value=&quot;' . encode_entities($configuration{$ck}) . '&quot; /&gt;' ; } print '&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;'; This work is free software, by , and is provided as-is. If you need support, ask in the TinyMCE forums....]]></summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <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" />
    <category term="tinymce" label="tinymce" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="webdev" label="webdev" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p>After looking at the open source alternatives, I decided the price was worth to buy the <span class="caps">MCIM</span>ageManager plugin for <a href="http://tinymce.moxiecode.com/">TinyMCE</a>. This open source (LGPL) Rich Text Editor is probably the best out there: the great image upload plugin, developed by the same folks, is however not free - but definitely worth its money.</p>

<p>The backend of <span class="caps">MCI</span>mageManger is in <span class="caps">PHP </span>or .NET: I decided to stick with the <span class="caps">PHP </span>version, as my web server is on Unix, but still had to find out how to integrate it with my web application (which is in Perl) making sure only logged in users would be allowed to upload files. There are code examples for <span class="caps">JSP, ASP</span> Classic and several <span class="caps">PHP </span>configurations, but nothing related to Perl. So, I ported the authentication script - it was easy enough and here's the result.</p>

<p>If you use Perl and you want to integrate authentication with the one of your system, you need to use <em>ExternalAuthenticator</em> in order to share sessions between Perl and <span class="caps">PHP</span>/.NET. It's not that difficult: since the Perl <em>ExternalAuthenticator</em> script is not provided, you can find one I wrote myself here.</p>

<p><big><strong><span class="caps">MCI</span>mageManager configuration</strong></big></p>

<p>File to edit is likely ''config.php''. If you use ''Web.config'', these instructions still apply.<br />
First of all, you need to enable the ''ExternalAuthenticator'':</p>



<pre><code>$mcImageManagerConfig['authenticator'] = &quot;ExternalAuthenticator&quot;;</code></pre>



<p>Scroll down a bit and you'll find the relevant configuration options for ''ExternalAuthenticator'':</p>



<pre><code>// ExternalAuthenticator config
$mcImageManagerConfig['ExternalAuthenticator.external_auth_url'] = &quot;/manage/tinymce_auth.pl&quot;;
$mcImageManagerConfig['ExternalAuthenticator.secret_key'] = &quot;TheKey&quot;;</code></pre>



<p><big><strong>tinymce_auth.pl</strong></big></p>

<p>Put this file at the location you specified in ''config.php''. You need to edit some parth: the secret key and, of course, the part which verifies the user is authenticated.</p>

<code>

<pre>#!/usr/bin/perl

use strict;
use warnings;

use CGI::Carp qw/fatalsToBrowser/;
use CGI::Simple;
use CGI::Session;
use HTML::Entities;
use Digest::MD5 qw/md5_hex/;

# Must match the one in config.php
my $secretKey = &quot;TheKey&quot;;

my $q = CGI::Simple-&gt;new();
print $q-&gt;header(
    -type   =&gt; 'text/html; charset=UTF-8',
);

my $session = CGI::Session-&gt;new();

# See if session-id is OK
if ( !$session-&gt;param('idadmin') =~ /^\d+$/ ) {
     print &quot;Not logged in&quot;;
     exit;
}

# Come configuration variables can be overridden here
my %configuration = (
    #'filesystem.rootpath'   =&gt; '/some/path',
    #'filesystem.path'       =&gt; '/some/path',
);

my $data = '';
for my $cv (values %configuration) {
    $data .= $cv;
}
my $key = md5_hex($data . $secretKey);

print '&lt;html&gt;';
print '&lt;body onload=&quot;document.forms[0].submit();&quot;&gt;';
print '&lt;form method=&quot;post&quot; action=&quot;' . encode_entities($q-&gt;param('return_url')) . '&quot;&gt;';
print '&lt;input type=&quot;hidden&quot; name=&quot;key&quot; value=&quot;'. encode_entities($key) . '&quot; /&gt;';
for my $ck (keys %configuration) {
     my $enc_ck = $ck; $enc_ck =~ s/\./_/g;
     print '&lt;input type=&quot;hidden&quot; name=&quot;'
        . encode_entities($enc_ck)
        . '&quot; value=&quot;'
        . encode_entities($configuration{$ck})
        . '&quot; /&gt;'
    ;
}
print '&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;';</pre>

</code>

<p>This work is free software, by , and is provided as-is. If you need support, ask in the <a href="http://tinymce.moxiecode.com/punbb/">TinyMCE forums</a>.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Parrot 1.0.0</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/03/parrot-100.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.180</id>

    <published>2009-03-19T22:23:13Z</published>
    <updated>2009-03-19T22:40:33Z</updated>

    <summary>[This is a translation of my article in Italian language on Perl.it] Sometimes things happen when few are still left to believe in them, nevertheless they are able to bring new enthusiasm and life to projects which seemed to be sentenced to a never ending gestational status. OK, I&apos;m now going to come out of this &quot;Barack Obama mode&quot;, but I hope I gave an idea of how much March 17, 2009, the date of the release of Parrot 1.0.0 is important for the Perl community (and not just for it). Anyone who&apos;s got something to with Perl likely knows what Parrot is, but this moment deserves a brief refreshing about its main features. First of all, it&apos;s a virtual machine which aims at becoming the virtual machine. Even though its development started out from the Perl community, the goal is that other dynamic languages should be able - or even want - to use it as well, as Parrot will grant superior performance. For other technical information, please read the Parrot Wikipedia page, as I&apos;d like to write something about the second reason for which Parrot is important. It&apos;s maturation is fundamental to give a boost to Perl 6 development, in order to reach the much awaited first major release of our favourite language, an event we&apos;ve been waiting for years: yt&apos;s current implementation, Rakudo, is being developed upon Parrot. Many more steps still have to be performed, and maybe many folks will continue to state, as a joke or seriously, that Perl 6 will never see the light. However, as Parrot did, Perl 6 could surprise you as well....</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="parrot" label="parrot" scheme="http://www.sixapart.com/ns/types#tag" />
    <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://www.cattlegrid.info/blog/">
        <![CDATA[<p>[This is a translation of <a href="http://www.perl.it/blog/archives/000632.html">my article in Italian language on Perl.it</a>]</p>

<p>Sometimes things happen when few are still left to believe in them, nevertheless they are able to bring new enthusiasm and life to projects which seemed to be sentenced to a never ending gestational status. <span class="caps">OK,</span> I'm now going to come out of this "Barack Obama mode", but I hope I gave an idea of how much <strong>March 17, 2009</strong>, the date of the <a href="http://www.parrot.org/news/2009/Parrot-1.0.0">release of Parrot 1.0.0</a> is important for the Perl community (and not just for it).</p>

<p>Anyone who's got something to with Perl likely knows what Parrot is, but this moment deserves a brief refreshing about its main features. First of all, it's a virtual machine which aims at becoming <em>the</em> virtual machine. Even though its development started out from the Perl community, the goal is that other dynamic languages should be able - or even <em>want</em> - to use it as well, as Parrot will grant superior performance.</p>

<p>For other technical information, please read the <a href="http://en.wikipedia.org/wiki/Parrot_virtual_machine">Parrot Wikipedia page</a>, as I'd like to write something about the second reason for which Parrot is important. It's maturation is fundamental to give a boost to Perl 6 development, in order to reach the much awaited first major release of our favourite language, an event we've been waiting for years: yt's current implementation, <a href="http://rakudo.org/">Rakudo</a>, is being developed upon Parrot.</p>

<p>Many more steps still have to be performed, and maybe many folks will continue to state, as a joke or seriously, that Perl 6 will never see the light. However, as Parrot did, Perl 6 could surprise you as well.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Learning Perl (5th edition)</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/03/learning-perl-5th-edition.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.179</id>

    <published>2009-03-02T09:08:36Z</published>
    <updated>2009-03-02T09:21:17Z</updated>

    <summary><![CDATA[This review is by Nicola Gigante, a member of "Nordest.pm"http://nordest.pm.org/. Thank you for the contribution! Click here to read this review in Italian language. Learning Perl (5th edition) Randal L. Schwartz, Tom Phoenix &amp; brian d foy O'Reilly Media, 2008 ISBN: 9780596520106 US$ 39.99 (printed) - US$ 31.99 (electronic) Rating: 4.5/5 Perl is a very flexible language. It has the most complex grammar you can find around, and a context-dependent semantic, and this makes perl an easy and yet powerful scripting language. The 5th edition of Learning Perl is just about how to write scripts with it. It wonʼt teach you how to write huge and complex software or how to optimize your code to make it fast and yet extensible. After all, this book is just about learning the language. The big work made by Schwartz and co. was to write a book that lets you feel the extremely high level of flexibility you get from the perl syntax. The book is full of examples, and itʼs common to find a way to solve a given problem, just to read how it can be solved with fewer lines of code or in a faster way respect of a previous solution. The book also highlights the most famous perl features. Theyʼre text and list processing tools, such as regular expressions and sort routines. After the first chapters explaining basic language features like numbers, strings, arrays and hashes manipulation, three chapters are dedicated to regular expressions: how to write and understand them, how to use them to match text, and how to use them to replace text. Also, a whole chapter is dedicated to methods and techniques to sort arrays and hashes. The second part of the book is about manipulating files, processes, and other things needed for administrative purpose, a field where perl scripts are used very often. The other two books of the series, Intermediate Perl, and Advanced Perl, complete this book, covering things that you donʼt find here. If you donʼt know the language and want to learn it, or if you know it briefly and want to improve your basic knowledge, this is the right book for you....]]></summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="book" label="book" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="oreilly" label="oreilly" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="review" label="review" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p>This review is by <strong>Nicola Gigante</strong>, a member of "Nordest.pm"http://nordest.pm.org/. Thank you for the contribution!</p>

<p><a href="http://www.perl.it/documenti/bibliografia/42.html">Click here to read this review in Italian language.</a></p>

<p><img src="http://oreilly.com/catalog/covers/9780596520106_cat.gif" alt="" class="right" style="float:right" /></p>

<h3><a href="http://oreilly.com/catalog/9780596520106/index.html"><strong>Learning Perl (5th edition)</strong></a><br />
<em>Randal L. Schwartz, Tom Phoenix &amp; brian d foy</em><br />
<a href="http://www.oreilly.com/"><span class="caps">O'R</span>eilly Media</a>, 2008<br />
<span class="caps">ISBN</span>: 9780596520106<br />
US$ 39.99 (printed) - US$ 31.99 (electronic)</h3>

<p>Rating: <em>4.5/5</em></p>

<p>Perl is a very flexible language. It has the most complex grammar you can find around,<br />
and a context-dependent semantic, and this makes perl an easy and yet powerful scripting language. The 5th edition of Learning Perl is just about how to write scripts with it. It wonʼt teach you how to write huge and complex software or how to optimize your code to make it fast and yet extensible. After all, this book is just about learning the language. The big work made by Schwartz and co. was to write a book that lets you feel the extremely high level of flexibility you get from the perl syntax. The book is full of examples, and itʼs common to find a way to solve a given problem, just to read how it can be solved with fewer lines of code or in a faster way respect of a previous solution. The book also highlights the most famous perl features. Theyʼre text and list processing tools, such as regular expressions and sort routines. After the first chapters explaining basic language features like numbers, strings, arrays and hashes manipulation, three chapters are dedicated to regular expressions: how to write and understand them, how to use them to match text, and how to use them to replace text. Also, a whole chapter is dedicated to methods and techniques to sort arrays and hashes. The second part of the book is about manipulating files, processes, and other things needed for administrative purpose, a field where perl scripts are used very often. The other two books of the series, Intermediate Perl, and Advanced Perl, complete this book, covering things that you donʼt find here. If you donʼt know the language and want to learn it, or if you know it briefly and want to improve your basic knowledge, this is the right book for you.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Perl: still the leading dynamic language for Open Source</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/01/perl-still-the-leading-dynamic.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.178</id>

    <published>2009-01-21T23:52:27Z</published>
    <updated>2009-01-23T10:06:00Z</updated>

    <summary> British online technical newspaper The Register has this very interesting article which shows statistics about new open source projects born in 2008. Numbers are provided by license tracker Black Duck Software C is (unsurprisingly) first: 47% of open source projects born in 2008 use it. What&apos;s most interesting, however, is that Perl is the first of the dynamic languages (excluding client-side scripting ones, i.e. JavaScript): 18% of new projects chose it (PHP is stuck at 11% and Ruby at 6%). Anybody who was saying Perl was obsolete now has his answer....</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="languages" label="languages" 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://www.cattlegrid.info/blog/">
        <![CDATA[<p><img src="/images/perl-onion_100.png" alt="" height="100" width="100" class="right" style="float:right" /></p>

<p>British online technical newspaper The Register has <a href="http://www.theregister.co.uk/2009/01/21/open_source_projects_08/">this very interesting article</a> which shows statistics about new open source projects born in 2008. Numbers are provided by license tracker Black Duck Software</p>

<p>C is (unsurprisingly) first: 47% of open source projects born in 2008 use it.</p>

<p>What's most interesting, however, is that <strong>Perl</strong> is the first of the dynamic languages (excluding client-side scripting ones, i.e. JavaScript): <strong>18%</strong> of new projects chose it (PHP is stuck at 11% and Ruby at 6%). Anybody who was saying Perl was obsolete now has his answer.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Seven facts about me</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2009/01/seven-facts-about-me.html" />
    <id>tag:www.cattlegrid.info,2009:/blog//1.177</id>

    <published>2009-01-15T13:58:02Z</published>
    <updated>2009-01-17T13:07:42Z</updated>

    <summary>After reading larsen&apos;s facts, I challenged myself in this game. If you want to play, these are the rules: Link your original tagger(s), and list these rules on your blog. Share seven facts about yourself in the post - some random, some weird. Tag seven people at the end of your post by leaving their names and the links to their blogs. Let them know they&apos;ve been tagged by leaving a comment on their blogs and/or other mean (Twitter, Facebook ...). So, some facts about me: I work as computer programmer. It isn&apos;t always great, but I think I&apos;m blessed because I have the opportunity do do what I like every single day. I live in Maniago, which is located in North-Eastern Italy. In the past I thought I didn&apos;t like this place, but after seeing a lot of places in the world I&apos;m now confident this is among the best where to stay. I maintain a web forum related to my town. I play the bass guitar in a brit rock band (the Gin Tonics), but don&apos;t really know much about it as I never attended a single lesson regarding bass or music in general. I believe &quot;fair play&quot; is fundamental in every aspect of life. I&apos;m often worried for many things, but I rarely admit it if asked. I haven&apos;t got a best friend and I consider myself lucky for this, as there is more than one person who I regard as a best friend. Should I ever need to escape somewhere to stay for some time on my own, that place would be the Orkney Islands. I know the rules want me to tag seven people, but the ones who come to my mind don&apos;t have a blog - so I have to skip this.part of the game. ;-) If you&apos;re reading this, I&apos;d be happy if you consider yourself tagged and play....</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="life" label="life" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="personal" label="personal" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p>After reading <a href="http://www.stefanorodighiero.net/blog/2009/01/seven-facts-about-me/">larsen's facts</a>, I challenged myself in this game. If you want to play, these are the rules:</p>


<ul>
<li>Link your original tagger(s), and list these rules on your blog.</li>
<li>Share seven facts about yourself in the post - some random, some weird.</li>
<li>Tag seven people at the end of your post by leaving their names and the links to their blogs.</li>
<li>Let them know they've been tagged by leaving a comment on their blogs and/or other mean (Twitter, Facebook ...).</li>
</ul>



<p>So, some facts about me:</p>


<ul>
<li>I work as computer programmer. It isn't always great, but I think I'm blessed because I have the opportunity do do what I like every single day.</li>
<li>I live in Maniago, which is located in North-Eastern Italy. In the past I thought I didn't like this place, but after seeing a lot of places in the world I'm now confident this is among the best where to stay. I maintain a <a href="http://www.maniago.info">web forum</a> related to my town.</li>
<li>I play the bass guitar in a brit rock band (the Gin Tonics), but don't really know much about it as I never attended a single lesson regarding bass or music in general.</li>
<li>I believe "fair play" is fundamental in every aspect of life.</li>
<li>I'm often worried for many things, but I rarely admit it if asked.</li>
<li>I haven't got a best friend and I consider myself lucky for this, as there is more than one person who I regard as a best friend.</li>
<li>Should I ever need to escape somewhere to stay for some time on my own, that place would be the Orkney Islands.</li>
</ul>



<p>I know the rules want me to tag seven people, but the ones who come to my mind don't have a blog - so I have to skip this.part of the game. ;-) If you're reading this, I'd be happy if you consider yourself tagged and play. </p>]]>
        
    </content>
</entry>

<entry>
    <title>My great ADSL</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2008/12/my-great-adsl.html" />
    <id>tag:www.cattlegrid.info,2008:/blog//1.176</id>

    <published>2008-12-16T21:28:00Z</published>
    <updated>2008-12-17T09:57:56Z</updated>

    <summary>My ADSL (provided by NGI) has been performing quite badly lately (in the last two years), and after trying to solve the problems with my provider I&apos;m about to change it - I waited even for too long. Here&apos;s the screenshot of my IRC session of tonight. I&apos;m lordarthas, see how many ghosts of me are in there because of disconnections. Fun, uh?...</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="adsl" label="adsl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="italy" label="italy" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="scandal" label="scandal" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p>My <span class="caps">ADSL </span>(provided by <a href="http://f5.ngi.it"><span class="caps">NGI</span></a>) has been performing quite badly lately (in the last two years), and after trying to solve the problems with my provider I'm about to change it - I waited even for too long.</p>

<p>Here's the screenshot of my <span class="caps">IRC </span>session of tonight. I'm <em>lordarthas</em>, see how many ghosts of me are in there because of disconnections. Fun, uh?</p>

<p><img src="/images/cadute_linea.png" alt="" height="559" width="700" /></p>]]>
        
    </content>
</entry>

<entry>
    <title>London Perl Workshop 2008 - a review</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2008/12/london-perl-workshop-2008---a.html" />
    <id>tag:www.cattlegrid.info,2008:/blog//1.175</id>

    <published>2008-12-04T07:30:05Z</published>
    <updated>2008-12-04T10:41:26Z</updated>

    <summary>I attended London Perl Workshop for the first time this year: London is quite easy and inexpensive to reach from the Venice, Italy area where I live, so it made a lot of sense to me to go there for a few reasons: the list of talks was impressive; I wanted to give a lightning talk about the Italian Perl Community; I was keen to to know if they were doing better than we did at the Italian Perl Workshop. :-) The workshop was held on Saturday, so I decided to stay the entire week-end: even though I visited London a lot of times in the past, there&apos;s always something to see and do there. The event took place at the New Cavendish Campus of the University of Westminster, which is a quite central location, just opposite the British Telecom tower (one of London skyline&apos;s main fixtures) and conveniently near Great Portland Street tube station. Once I got there, I realized what the organizers already stated: the organization was quite basic. The was no real registration process, but just a list where to tick your name and a girl giving out badges - which is more than enough, anyway. There was no wi-fi access (there were networks, but they belonged to University of Westminster and required login credentials we didn&apos;t have), but since I didn&apos;t even bring my laptop to the UK it was hardly a problem. And, hey, attending the workshop was free of charge. The conference was split in four tracks, and therefore in four rooms: the biggest one was quite nice, holding approximately 250 people and with quite comfortable seats; also the second one was big enough, while the other two were actually classrooms and therefore smaller. This was actually fine, as one of these last 2 was used for 3-hours tutorials (so it was far from being full) and the other one was for supposedly more specialist talks, even though it was very full at times. The workshop kicked off with a talk about London.pm given out by its historical leader, Dave Cross: that was very fun and entertaining! Next I followed an introduction to 10 CPAN modules by Leon Brocard, and I found there are really some modules which would be useful for me and of which I didn&apos;t know about (I&apos;ve always been sure of that, CPAN is so huge...). The two talks by Matt Trout I listened to were among my favourites: he&apos;s very passionate in his explanation, no matter whether he speaks about something useful (see DBIx::Class+Postgres) or about something which is almost just a mental exercise (such see Acme::Yorkshire). Mike Whitaker give out two talks about Moose, one basic and one intermediate: it was really nice to hear some details about such a great object oriented framework - Mike get ready, we&apos;ll try to bring you to Italy for our workshop. :-) Andy Wardley&apos;s talk was about Badger, a toolkit which can be seen as sort of &quot;lightweight Moose&quot; and upon which Andy built many modules which abstract a lot of functionality provided by Perl and by other modules; also Template Toolkit 3, a product of Andy himself, is Badger-based and should be soon on CPAN (I can&apos;t wait, I&apos;m an avid TT2 user). Hakim Cassimally&apos;s Functional Pearls was the greatest last talk a workshop could have had: if you&apos;ve never heard about programmable semicolons, well take a look. One of the lightning talks was pure genius: David Leadbeater created a Wikipedia summary system which had a method of querying it using DNS TEXT records (think about caching for free...)!! All in all, the workshop was great. As you might have already guessed, the mean level was quite high, with some impressive peaks. Even though there were 4 tracks, there was not a basic one to speak of, which makes the workshop very interesting for Perl programmers but, of course, a little less appealing for folks trying to learn the language. After all this food for thought, there was a need for food for the body (not to mention beer), and here came a big surprise: the workshop organization reserved an entire pub and food and beers were served free of charge for all the evening! Speaking with Mark Keating, one of the organization leaders, it turned out he wanted people to finally associate free software with free beer, not the opposite as we&apos;ve always learned. What a great idea!!! So, for all of this I would like to thank all London.pm and other Perl Mongers who organized this event, and all the sponsors who made this possible (click here to see who they are)....</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="community" label="community" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="conference" label="conference" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="london" label="london" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="workshop" label="workshop" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p>I attended <a href="http://conferences.yapceurope.org/lpw2008/">London Perl Workshop</a> for the first time this year: London is quite easy and inexpensive to reach from the Venice, Italy area where I live, so it made a lot of sense to me to go there for a few reasons: the list of talks was impressive; I wanted to give a <a href="http://www.cattlegrid.info/files/italy_perl_success_story.pdf">lightning talk about the Italian Perl Community</a>; I was keen to to know if they were doing better than we did at the <a href="http://conferences.yapceurope.org/ipw2008/">Italian Perl Workshop</a>. :-)</p>

<p>The workshop was held on Saturday, so I decided to stay the entire week-end: even though I visited London a lot of times in the past, there's always something to see and do there. The event took place at the New Cavendish Campus of the University of Westminster, which is a quite central location, just opposite the British Telecom tower (one of London skyline's main fixtures) and conveniently near Great Portland Street tube station. Once I got there, I realized what the organizers already stated: the organization was quite basic. The was no real registration process, but just a list where to tick your name and a girl giving out badges - which is more than enough, anyway. There was no wi-fi access (there were networks, but they belonged to University of Westminster and required login credentials we didn't have), but since I didn't even bring my laptop to the UK it was hardly a problem. And, hey, attending the workshop was <em>free of charge</em>.</p>

<p>The conference was split in four tracks, and therefore in four rooms: the biggest one was quite nice, holding approximately 250 people and with quite comfortable seats; also the second one was big enough, while the other two were actually classrooms and therefore smaller. This was actually fine, as one of these last 2 was used for 3-hours tutorials (so it was far from being full) and the other one was for supposedly more specialist talks, even though it was very full at times.</p>

<p>The workshop kicked off with a talk about London.pm given out by its historical leader, Dave Cross: that was very fun and entertaining! Next I followed an introduction to 10 <span class="caps">CPAN </span>modules by Leon Brocard, and I found there are really some modules which would be useful for me and of which I didn't know about (I've always been sure of that, <span class="caps">CPAN </span>is so huge...). The two talks by Matt Trout I listened to were among my favourites: he's very passionate in his explanation, no matter whether he speaks about something useful (see <span class="caps">DBI</span>x::Class+Postgres) or about something which is almost just a mental exercise (such see Acme::Yorkshire). </p>

<p>Mike Whitaker give out two talks about <em>Moose</em>, one basic and one intermediate: it was really nice to hear some details about such a great object oriented framework - Mike get ready, we'll try to bring you to Italy for our workshop. :-) Andy Wardley's talk was about <em>Badger</em>, a toolkit which can be seen as sort of "lightweight Moose" and upon which Andy built many modules which abstract a lot of functionality provided by Perl and by other modules; also Template Toolkit 3, a product of Andy himself, is Badger-based and should be soon on <span class="caps">CPAN </span>(I can't wait, I'm an avid <span class="caps">TT2 </span>user). Hakim Cassimally's <em>Functional Pearls</em> was the <em>greatest last talk</em> a workshop could have had: if you've never heard about <em>programmable semicolons</em>, well take a look. One of the lightning talks was pure genius: David Leadbeater created a Wikipedia summary system which had a method of querying it using <span class="caps">DNS TEXT </span>records (think about caching for free...)!!</p>

<p>All in all, the workshop was great. As you might have already guessed, the mean level was quite high, with some impressive peaks. Even though there were 4 tracks, there was not a basic one to speak of, which makes the workshop very interesting for Perl programmers but, of course, a little less appealing for folks trying to learn the language. After all this food for thought, there was a need for food for the body (not to mention beer), and here came a big surprise: the workshop organization reserved an entire pub and food and beers were served <em>free of charge</em> for all the evening! Speaking with Mark Keating, one of the organization leaders, it turned out he wanted people to finally associate <em>free software</em> with <em>free beer</em>, not the opposite as we've always learned. What a great idea!!!</p>

<p>So, for all of this I would like to thank all <a href="http://london.pm.org">London.pm</a> and other Perl Mongers who organized this event, and all the sponsors who made this possible (<a href="http://conferences.yapceurope.org/lpw2008/sponsors.html">click here to see who they are</a>).</p>]]>
        
    </content>
</entry>

<entry>
    <title>Slides of my &quot;Italy, a Perl success story&quot; talk at London Perl Workshop 2008</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2008/12/slides-of-my-italy-a-perl-succ.html" />
    <id>tag:www.cattlegrid.info,2008:/blog//1.174</id>

    <published>2008-12-01T21:43:13Z</published>
    <updated>2008-12-04T07:50:36Z</updated>

    <summary>I recently did a lightning talk at London Perl Workshop 2008, regarding the status of the Italian Perl community (which is in good health, in case you&apos;re wondering). The slides, in PDF format, are available here: http://www.cattlegrid.info/files/italy_perl_success_story.pdf...</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="community" label="community" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="slides" label="slides" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="workshop" label="workshop" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p>I recently did a lightning talk at <a href="http://conferences.yapceurope.org/lpw2008/">London Perl Workshop 2008</a>, regarding the status of the Italian Perl community (which is in good health, in case you're wondering). The slides, in <span class="caps">PDF </span>format, are available here:</p>

<p><a href="http://www.cattlegrid.info/files/italy_perl_success_story.pdf">http://www.cattlegrid.info/files/italy_perl_success_story.pdf</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Adapting a Dojo module for cross-domain loading</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2008/10/modifying-a-dojo-module-for-cr.html" />
    <id>tag:www.cattlegrid.info,2008:/blog//1.173</id>

    <published>2008-10-31T11:25:25Z</published>
    <updated>2009-04-07T21:27:48Z</updated>

    <summary><![CDATA[Using the Dojo loader to include your own JavaScript module is very handy, and also works around several problems related to loading JavaScript code directly via the &lt;script&gt; tag. Often, however, you want to be able to load your modules across domains, so you need to write them in xd fashion. In itself, it's not a big issue as, with Dojo 1.2.0, a non-xd code such as this: (function(){ dojo.provide(&quot;cryo.Tree&quot;); dojo.provide(&quot;cryo.ForestStoreModel&quot;); dojo.require(&quot;dijit.Tree&quot;); dojo.declare(&quot;cryo.ForestStoreModel&quot;, dijit.tree.ForestStoreModel, { // class definition }); dojo.declare(&quot;cryo.Tree&quot;, dijit.Tree, { // class definition }); })(); just needs to become as follows to work with the Dojo cross-domain loader: dojo._xdResourceLoaded(function(){ return { depends: [ [&quot;provide&quot;, &quot;cryo.Tree&quot;], [&quot;provide&quot;, &quot;cryo.ForestStoreModel&quot;], [&quot;require&quot;, &quot;dijit.Tree&quot;] ], defineResource: function(dojo) { dojo.provide(&quot;cryo.Tree&quot;); dojo.provide(&quot;cryo.ForestStoreModel&quot;); dojo.require(&quot;dijit.Tree&quot;); dojo.declare(&quot;cryo.ForestStoreModel&quot;, dijit.tree.ForestStoreModel, { // class definition }); dojo.declare(&quot;cryo.Tree&quot;, dijit.Tree, { // class definition }); })(); Easy enough, but what usually happens is that you work with non-xd files while developing, while using the cross-domain features in production. Or maybe the opposite. Or something similar. Anyhow, in this case you most likely don't want to maintain two copies of the same JavaScript module where only header and footer are different. For sure I don't, so I wrote a small Perl script which converts non-xd modules to xd-enabled ones automatically by performing the following tasks: It parses dojo.require and dojo.provide statements in order to create the xd header. It substitutes the header with an xd one containing the information obtained in the parsing operation. It substitutes the closing parentheses with others which match the new header. OK, I know, there's also the Dojo Build System, but I didn't want to install Ant and a ton of Java-related dependencies for a task which requires 20 lines of code. This script is a quick hack so it has caveats: It's a quickly (and therefore poorly) coded dirty hack. Read the code before using it and edit it if needed. It's supposed to work if the code is formatted a bit differently than the examples above, but there's no guarantee - I just tried out some variations. It produces xd code only suitable for Dojo 1.2.0 (but changing it for 1.1.1 is trivial) On the other hand, using it makes no harm to your existing code: it will either work and produce (possibly broken) output files, or produce no files at all. So, I would say it is safe to try it. Usage: make_xd.pl file1.js file2.js ... filen.js You can pass one or more files on the command line: the script will produce filename.xd.js starting from filename.js, which is left untouched. Click here to download the script. If you improve this script, please let me know....]]></summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="coding" label="coding" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dojo" label="dojo" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="howto" label="howto" scheme="http://www.sixapart.com/ns/types#tag" />
    <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://www.cattlegrid.info/blog/">
        <![CDATA[<p>Using the Dojo loader to include your own JavaScript module is very handy, and also works around several problems related to loading JavaScript code directly via the <em>&lt;script&gt;</em> tag. Often, however, you want to be able to load your modules across domains, so you need to write them in <em>xd</em> fashion. In itself, it's not a big issue as, with Dojo 1.2.0, a non-xd code such as this:</p>

<code>

<pre>
(function(){
    dojo.provide(&quot;cryo.Tree&quot;);
    dojo.provide(&quot;cryo.ForestStoreModel&quot;);

    dojo.require(&quot;dijit.Tree&quot;);
    
    dojo.declare(&quot;cryo.ForestStoreModel&quot;, dijit.tree.ForestStoreModel, {
        // class definition
    });

    dojo.declare(&quot;cryo.Tree&quot;, dijit.Tree, {
        // class definition
    });
})();
</pre>

</code>

<p>just needs to become as follows to work with the Dojo cross-domain loader:</p>

<code>

<pre>
dojo._xdResourceLoaded(function(){ return {
    depends: [
        [&quot;provide&quot;, &quot;cryo.Tree&quot;],
        [&quot;provide&quot;, &quot;cryo.ForestStoreModel&quot;],
        [&quot;require&quot;, &quot;dijit.Tree&quot;]
    ],
    defineResource: function(dojo) {
    
    dojo.provide(&quot;cryo.Tree&quot;);
    dojo.provide(&quot;cryo.ForestStoreModel&quot;);

    dojo.require(&quot;dijit.Tree&quot;);
    dojo.declare(&quot;cryo.ForestStoreModel&quot;, dijit.tree.ForestStoreModel, {
        // class definition
    });

    dojo.declare(&quot;cryo.Tree&quot;, dijit.Tree, {
        // class definition
    });
})();
</pre>

</code>

<p>Easy enough, but what usually happens is that you work with non-xd files while developing, while using the cross-domain features in production. Or maybe the opposite. Or something similar. Anyhow, in this case you most likely don't want to maintain two copies of the same JavaScript module where only header and footer are different. For sure I don't, so I wrote a small Perl script which converts non-xd modules to xd-enabled ones automatically by performing the following tasks:</p>


<ul>
<li>It parses <code>dojo.require</code> and <code>dojo.provide</code> statements in order to create the xd header.</li>
<li>It substitutes the header with an xd one containing the information obtained in the parsing operation.</li>
<li>It substitutes the closing parentheses with others which match the new header.</li>
</ul>



<p><span class="caps">OK,</span> I know, there's also the <em>Dojo Build System</em>, but I didn't want to install Ant and a ton of Java-related dependencies for a task which requires 20 lines of code.</p>

<p>This script is a quick hack so it has caveats:</p>


<ul>
<li>It's a quickly (and therefore poorly) coded dirty hack.</li>
<li>Read the code before using it and edit it if needed.</li>
<li>It's supposed to work if the code is formatted a bit differently than the examples above, but there's no guarantee - I just tried out some variations.</li>
<li>It produces xd code only suitable for Dojo 1.2.0 (but changing it for 1.1.1 is trivial)</li>
</ul>



<p>On the other hand, using it makes no harm to your existing code: it will either work and produce (possibly broken) output files, or produce no files at all. So, I would say it is safe to try it.</p>

<p>Usage:</p>

<code>

<pre>
make_xd.pl file1.js file2.js ... filen.js
</pre>

</code>

<p>You can pass one or more files on the command line: the script will produce <em>filename.xd.js</em> starting from <em>filename.js</em>, which is left untouched.</p>

<p><a href="/files/make_xd_pl.txt" title="free software"><strong>Click here to download the script.</strong></a></p>

<p>If you improve this script, please let me know.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Mastering Dojo</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2008/10/mastering-dojo.html" />
    <id>tag:www.cattlegrid.info,2008:/blog//1.172</id>

    <published>2008-10-04T10:31:08Z</published>
    <updated>2008-10-08T10:20:40Z</updated>

    <summary> Mastering Dojo Rawld Fill, Craig Riecke, Alex Russell Pragmatic Bookshelf, 2008 ISBN: 978-1-934356-11-1 US$ 38.95 Rating: 4/5 (very good) The Dojo toolkit is, arguably, the most advanced JavaScript framework available today. jQuery might be designed equally well and be more compact, but it lacks advanced and ready to use GUI components. Ext JS might provide a ton of colourful widgets, but it lacks the implementation and API elegance of Dojo, not to mention it features a licensing system which is awkward enough to turn away any sane open source developer. Dojo still has, however, one major drawback: the documentation is sparse at best, and completely missing in some areas. The API reference is not rich enough, and parts of the online free Dojo Book are outdated; the best option for programmers is often to skim directly through the well-commented source code and through the accurately done test suites. Dojo is a big and complex project, so it will take a while for the community to document it properly; in the meanwhile, the excellent forums, Dojo Campus and the IRC channel provide an excellent resource. Printed books also come to the rescue of programmers who want to use Dojo: being the project so interesting, there are quite a lot of titles available, and Mastering Dojo ranks among the most up-to-date and interesting ones. Despite its name, this book is targeted to the programmer who doesn&apos;t yet use Dojo, as opposed to the Dojo programmer who wants to dig more deeply into the framework details. It, however, spans a wide range of Dojo-related topics: from the basics to the most advanced widgets (trees, grids) and other areas (internationalisation, extension of the framework). Basically, you just need to know JavaScript to read this book: even though Dojo also features an HTML declarative syntax, to obtain something useful out of the framework you really need to be comfortable with JavaScript. Every chapter is devoted to a topic, and is made of an introduction followed by well-made examples. It doesn&apos;t provide a reference: you learn the main things, and then if you want to know all the API you&apos;ll want to find more documentation elsewhere. What it provides is however what you need if you&apos;re new to Dojo: a description of what you can do and some examples on how to do it - so that basically you understand that you&apos;ll be able to use Dojo to create a modern web application in and easy (although, as all computer programming tasks, not always straightforward) way. Even though absolutely not a reference, Mastering Dojo can be used as such to some extent: the sections about events, DOM introspection and editing, classes and data are, for instance, enough in-depth to provide reference for most of the tasks a developer needs to perform. Others, such as the Grid and the Tree, are more like introductions to those advanced widgets, but are nevertheless very appreciated as it&apos;s not easy (if at all possible) to find coherent documentation elsewhere regarding them. All in all, if you plan to use Dojo because to have to create a serious web application, this book is an excellent starting point, and will likely remain useful also when your knowledge of the framework has grown....</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="ajax" label="ajax" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="book" label="book" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dojo" label="dojo" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="review" label="review" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p><img src="http://oreilly.com/catalog/covers/9781934356111_cat.gif" alt="" class="right" style="float:right" /></p>

<h3><a href="http://oreilly.com/catalog/9781934356111/index.html"><strong>Mastering Dojo</strong></a><br />
<em>Rawld Fill, Craig Riecke, Alex Russell</em><br />
<a href="http://www.pragprog.com/">Pragmatic Bookshelf</a>, 2008<br />
<span class="caps">ISBN</span>: 978-1-934356-11-1<br />
US$ 38.95</h3>

<p>Rating: <em>4/5 (very good)</em></p>

<p>The <a href="http://dojotoolkit.org">Dojo</a> toolkit is, arguably, the most advanced JavaScript framework available today. jQuery might be designed equally well and be more compact, but it lacks advanced and ready to use <span class="caps">GUI </span>components. Ext JS might provide a ton of colourful widgets, but it lacks the implementation and <span class="caps">API </span>elegance of Dojo, not to mention it features a licensing system which is awkward enough to turn away any sane open source developer.</p>

<p>Dojo still has, however, one major drawback: the documentation is sparse at best, and completely missing in some areas. The <span class="caps">API </span>reference is not rich enough, and parts of the online free Dojo Book are outdated; the best option for programmers is often to skim directly through the well-commented source code and through the accurately done test suites. Dojo is a big and complex project, so it will take a while for the community to document it properly; in the meanwhile, the excellent forums, Dojo Campus and the <span class="caps">IRC </span>channel provide an excellent resource. Printed books also come to the rescue of programmers who want to use Dojo: being the project so interesting, there are quite a lot of titles available, and <em>Mastering Dojo</em> ranks among the most up-to-date and interesting ones.</p>

<p>Despite its name, this book is targeted to the programmer who doesn't yet use Dojo, as opposed to the Dojo programmer who wants to dig more deeply into the framework details. It, however, spans a wide range of Dojo-related topics: from the basics to the most advanced widgets (trees, grids) and other areas (internationalisation, extension of the framework). Basically, you just need to know JavaScript to read this book: even though Dojo also features an <span class="caps">HTML </span>declarative syntax, to obtain something useful out of the framework you really need to be comfortable with JavaScript.</p>

<p>Every chapter is devoted to a topic, and is made of an introduction followed by well-made examples. It doesn't provide a reference: you learn the main things, and then if you want to know all the <span class="caps">API </span>you'll want to find more documentation elsewhere. What it provides is however what you need if you're new to Dojo: a description of what you can do and some examples on how to do it - so that basically you understand that you'll be able to use Dojo to create a modern web application in and easy (although, as all computer programming tasks, not always straightforward) way.</p>

<p>Even though absolutely not a reference, <em>Mastering Dojo</em> can be used as such to some extent: the sections about events, <span class="caps">DOM </span>introspection and editing, classes and data are, for instance, enough in-depth to provide reference for most of the tasks a developer needs to perform. Others, such as the Grid and the Tree, are more like introductions to those advanced widgets, but are nevertheless very appreciated as it's not easy (if at all possible) to find coherent documentation elsewhere regarding them.</p>

<p>All in all, if you plan to use Dojo because to have to create a serious web application, this book is an excellent starting point, and will likely remain useful also when your knowledge of the framework has grown.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Using reCAPTCHA with Perl</title>
    <link rel="alternate" type="text/html" href="http://www.cattlegrid.info/blog/2008/09/using-recaptcha-in-perl.html" />
    <id>tag:www.cattlegrid.info,2008:/blog//1.171</id>

    <published>2008-09-22T09:39:26Z</published>
    <updated>2008-09-22T10:42:45Z</updated>

    <summary>You all know: spam is a PITA. It just sucks because if you have a blog users won&apos;t like to read it any longer with all that junk. It also hurts if you collect user registrations or other data, as you&apos;ll need to filter the collected data and it always changes how software should understand what is spam and what isn&apos;t (as spam changes). CAPTCHAs&quot; have been somewhat a solution for some years. Requiring you to type a word which is in a picture, they should be able to tell if you&apos;re a human or a piece of software. First CAPTCHAs were simple and easy to ready, but soon OCR software was able to read them too; so they became more and more complex, featuring noise, distorted words, fancy colours, etc. The art of designing a CAPTCHA is fairly simple: it should be unreadable by a machine and as simple as possible to read for a human, as you surely don&apos;t want anybody to be unable to use your web site no matter how stupid they might be because they are unable to figure out a few letters on an image. Since it&apos;s a bit of a pain to always have to change and improve your CAPTCHA images in order to keep spammers outside, I recently began exploring reCAPTCHA. This article is about reCAPTCHA and is usage with Perl both directly with Captcha::reCAPTCHA and with HTML::FormFu....</summary>
    <author>
        <name>Michele Beltrame</name>
        <uri>http://www.varlogarthas.net/</uri>
    </author>
    
    <category term="captcha" label="captcha" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="coding" label="coding" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="formfu" label="formfu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="recaptcha" label="recaptcha" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="spam" label="spam" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cattlegrid.info/blog/">
        <![CDATA[<p>You all know: spam is a <span class="caps">PITA.</span> It just sucks because if you have a blog users won't like to read it any longer with all that junk. It also hurts if you collect user registrations or other data, as you'll need to filter the collected data and it always changes how software should understand what is spam and what isn't (as spam changes).</p>

<p><img src="/images/recaptcha_example.png" alt="" height="155" width="250" class="right" style="float:right" /></p>

<p><a href="http://en.wikipedia.org/wiki/Captcha"><span class="caps">CAPTCHA</span>s</a>" have been somewhat a solution for some years. Requiring you to type a word which is in a picture, they should be able to tell if you're a human or a piece of software. First <span class="caps">CAPTCHA</span>s were simple and easy to ready, but soon <span class="caps">OCR </span>software was able to read them too; so they became more and more complex, featuring noise, distorted words, fancy colours, etc. The art of designing a <span class="caps">CAPTCHA </span>is fairly simple: it should be unreadable by a machine and as simple as possible to read for a human, as you surely don't want anybody to be unable to use your web site no matter how stupid they might be because they are unable to figure out a few letters on an image.</p>

<p>Since it's a bit of a pain to always have to change and improve your <span class="caps">CAPTCHA </span>images in order to keep spammers outside, I recently began exploring <a href="http://recaptcha.net">reCAPTCHA</a>.</p>

<p>This article is about reCAPTCHA and is usage with Perl both directly with <a href="http://search.cpan.org/dist/Captcha-reCAPTCHA/lib/Captcha/reCAPTCHA.pm">Captcha::reCAPTCHA</a> and with <a href="http://search.cpan.org/dist/HTML-FormFu/lib/HTML/FormFu.pm"><span class="caps">HTML</span>::FormFu</a>.</p>]]>
        <![CDATA[<p>reCAPTCHA is a web service, and it has some really interesting advantages: it's easier to setup (you don't need to deal with generating the letter, the image, storing them in the session or in some other place etc...); it's automatically improved by the admins of the servers if it gets broken; it features an audio challenge if a user is visually impaired; there's an automatic IP-based banning system; it's easy enough to read for humans and difficult enough to parse for <span class="caps">OCR </span>software. Oh, and did I mention it? It's free as in free beer. Plus, there's another big feature, which has nothing to do with spam: by using it, you help to digitize books which are not readable by <span class="caps">OCR.</span> The mechanism for doing this is simple: the two words you see on the <span class="caps">CAPTCHA </span>(see image above) both come from scanned text, but while one is already recognized by the system the other isn't so one word is for the user to resolve or he won't go on, and the other is for the user to resolve to help digitizing books: of course, the user doesn't know which words is already known and which isn't. Genius, uh?</p>

<p>Now to the whole point of this article... how can this service be easily used with our favourite language, Perl? Thanks to Andy Armstong's <a href="http://search.cpan.org/dist/Captcha-reCAPTCHA/lib/Captcha/reCAPTCHA.pm">Captcha::reCAPTCHA</a> <span class="caps">CPAN </span>module, it's trivial. Once you registered your domain on the web site and got your public and private keys, you're ready to set the thing up.</p>

<p>On the action which creates your web form you to write nothing more than something like:</p>

<code>

<pre>

    use Captcha::reCAPTCHA;

    my $rc = Captcha::reCAPTCHA-&gt;new();

    print 'HTML form...';
    print $c-&gt;get_html('PUBLIC_KEY' );
    print 'End of HTML form...';

</pre>

</code>

<p>Well, most likely you won't make your web pages in such a rude way, but rather use something like Template Toolkit. Anyhow, you got the concept: <code>$rc-&gt;get_html()</code> returns you the <span class="caps">HTML </span>code which you can put into your page where you want the reCAPTCHA widget to appear.</p>

<p>The verification, to be performed on the action which receives your form (if different from the one which created it), is just a bit more complex:</p>

<code>

<pre>

    use CGI::Simple;
    use Captcha::reCAPTCHA;

    my $q = CGI::Simple-&gt;new();
    my $rc = Captcha::reCAPTCHA-&gt;new();

    # Verify submission
    my $result = $rc-&gt;check_answer(
        'PRIVATE_KEY', $q-&gt;remote_addr,
        $q-&gt;param('recaptcha_challenge_field'),
        $q-&gt;param('recaptcha_response_field'),
    );

    if ( $result-&gt;{is_valid} ) {
        # Process the form
    } else {
        # Redisplay the form, with reCAPTCHA error
    }

</pre>

</code>

<p>This is damn easy, but it still could prove to be a bit inelegant to hack it inside an <span class="caps">HTML</span>::FormFu form, which it's an highly recommended form generation and validation framework maintained by Carl Franks (most Catalyst users manage their forms with FormFu).</p>

<p>Luckily, FormFu provides an element dedicated to reCAPTCHA, which wraps the calls to Andy Armstrong's module.</p>

<code>

<pre>

    # Yes folks, I like to write elements in Perl instead of YAML ;-)
    $fieldset-&gt;{elements} = [
       # ...elements ...
       , {
            type             =&gt; 'reCAPTCHA',
            name           =&gt; 'recaptcha',
            public_key   =&gt; $self-&gt;{recaptcha_public_key},
            private_key  =&gt; $self-&gt;{recaptcha_private_key},
        },
        # ...elements...
    ];

</pre>

</code>

<p>The above code does all the magic: it add the reCAPTCHA widget to your form with a constraint attached to it which makes sure the user typed the correct words in. The handling of the field on the submitted form is transparent to the programmer as you just leave the standard:</p>

<code>

<pre>

    if ( $form-&gt;submitted_and_valid ) {
        # Process the form
    }

</pre>

</code>

<p>untouched, as reCAPTCHA errors are treated just like another invalid input.</p>]]>
    </content>
</entry>

</feed>
