tag:blogger.com,1999:blog-77347995963259550052024-03-18T16:29:24.978-03:00The Onion StandShowcasing some Perl to the unsuspecting Worldgaruhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.comBlogger47125tag:blogger.com,1999:blog-7734799596325955005.post-29390782663043726592015-04-30T17:23:00.001-03:002015-04-30T17:23:58.940-03:00My March & April CPAN PR Challenge dists<i>As I got ready to blog about my PR Challenge assigned dist for April, I realized I had forgotten to blog about my last month's assigned dist, so I have decided to write a joined march/april report :)</i><br />
<br />
<h3>
March distribution: <a href="https://metacpan.org/pod/Web::Library::UnderscoreJS" rel="nofollow" target="_blank">Web::Library::UnderscoreJS</a></h3>
<br />
This neat module by Marcel Grünauer is a wrapper for the <a href="http://underscorejs.org/" target="_blank">Underscore JavaScript library</a>, which itself provides over a 100 functional helpers and goodies for your frontend programming like function binding, JS templating, quick indexes, and much more.<br />
<br />
The wrapper comes from <a href="https://metacpan.org/pod/Web::Library" rel="nofollow" target="_blank">Web::Library</a>, a general manager for client-side dependencies. Say you have a web application. You spawn the Web::Library singleton and mount the libraries you want to use (Underscore in our case):<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> my $library_manager = Web::Library->instance;<br /> $library_manager->mount_library({ name => 'UnderscoreJS' }); </span></span></b><br />
<br />
Then you set the include_paths() from the instance as directories to search for static files. In Catalyst, this can be achieved with <a href="https://metacpan.org/pod/Catalyst::Plugin::Static::Simple" rel="nofollow" target="_blank">Catalyst::Plugin::Static::Simple</a>, like so:<br />
<br />
<b><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> __PACKAGE__->config(<br /> 'Plugin::Static::Simple' => {<br /> include_path => [ $library_manager->include_paths ] },<br /> ...<br /> );</span></span></b><br />
<br />
Then pass the instance to your templates and call the appropriate methods to print the required CSS/JS lines:<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> <head</span></span></b><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></b><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">></span></span></b></span></span></b><br /> ...<br /> [% web_library.css_link_tags_for('UnderscoreJS') %]<br /> </span></span></b><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><</span></span></b>/head</span></span></b><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></b><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">></span></span></b></span></span></b></span></span></b><br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span></b><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><</span></span></b>body</span></span></b><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">></span></span></b></span></span></b><br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span></b> ...<br /> [% web_library.script_tags_for('UnderscoreJS') %]<br /> </span></span></b><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><</span></span></b>/body></span></span></b><br />
<br />
My pull requests for this distribution involved <a href="https://github.com/marcelgruenauer/Web-Library-UnderscoreJS/pull/1" rel="nofollow" target="_blank">bumping up the copyright year</a>, <a href="https://github.com/marcelgruenauer/Web-Library-UnderscoreJS/pull/2" rel="nofollow" target="_blank">some minor pod formatting issues</a>, <a href="https://github.com/marcelgruenauer/Web-Library-UnderscoreJS/pull/3" rel="nofollow" target="_blank">updating the UndescoreJS library versions (up to 1.8.2)</a>, and <a href="https://github.com/marcelgruenauer/Web-Library-UnderscoreJS/pull/4" rel="nofollow" target="_blank">adding a Travis-CI code badge</a>. I also investigated some CPAN Testers failure reports for this distribution on MS Windows, but they turned out to come from Web::Library itself. Nevertheless, I also send a <a href="https://github.com/marcelgruenauer/Web-Library/pull/5" rel="nofollow" target="_blank">PR with a fix</a> and another one that <a href="https://github.com/marcelgruenauer/Web-Library/pull/6" rel="nofollow" target="_blank">reduced the minimum perl version to 5.6</a>, which was <a href="https://github.com/marcelgruenauer/Web-Library/issues/3" rel="nofollow" target="_blank">asked in an open issue</a>.<br />
<br />
<br />
<h3>
April distribution: <a href="https://metacpan.org/pod/Mojolicious::Plugin::ServerStatus" rel="nofollow" target="_blank">Mojolicious::Plugin::ServerStatus</a></h3>
<br />
This is a plugin for <a href="http://mojolicio.us/" rel="nofollow" target="_blank">Mojolicious</a> that shows server status information, similar to Apache's mod_status. It is based on the general <a href="https://metacpan.org/pod/Plack::Middleware::ServerStatus::Lite" rel="nofollow" target="_blank">Plack::Middleware::ServerStatus::Lite</a> middleware and works on multiprocess servers like morbo and hypnotoad. It's not able to monitor keepalive sessions and network I/O wait, but it still gives some nice output in different formats.<br />
<br />
All you have to do is load the plugin and tell it which route path to render. Optionally, for security, you can set which IPs to allow:<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> plugin 'ServerStatus' => {<br /> path => '/server-status',<br /> allow => [ '127.0.0.1', '192.168.0.0/16' ],<br /> };</span></span></b><br />
<br />
That's it! After the server is up, all you have to do is query the proper path:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b> % curl http://server:port/server-status</b><br /> Uptime: 1234567789<br /> Total Accesses: 123<br /> BusyWorkers: 2<br /> IdleWorkers: 3<br /> --<br /> pid status remote_addr host method uri protocol ss<br /> 20060 A 127.0.0.1 localhost:10001 GET / HTTP/1.1 1<br /> 20061 .<br /> 20062 A 127.0.0.1 localhost:10001 GET /server-status HTTP/1.1 0<br /> 20063 .<br /> 20064 .</span></span><br /><br />
You can also ask for JSON output format:<br />
<br /><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><b> % curl http://server:port/server-status?json</b><br /> {"Uptime":"1332476669","BusyWorkers":"2",<br /> "stats":[<br /> {"protocol":null,"remote_addr":null,"pid":"78639",<br /> "status":".","method":null,"uri":null,"host":null,"ss":null},<br /> {"protocol":"HTTP/1.1","remote_addr":"127.0.0.1","pid":"78640",<br /> "status":"A","method":"GET","uri":"/","host":"localhost:10226","ss":0},<br /> ...<br /> ],"IdleWorkers":"3"}</span></span><br />
<br />
Unfortunately, this distribution didn't have any contents in the main github repository, so instead of making several branches off of master, I used my own master branch and made one commit per change in a <a href="https://github.com/iakuf/mojolicious-plugin-serverstatus/pull/2" rel="nofollow" target="_blank">single pull request</a>. The first commit of course was just a s<a href="https://github.com/garu/mojolicious-plugin-serverstatus/commit/64214cefdd43f9662ff7d1e30708299eda699f5a" rel="nofollow" target="_blank">ync between the repository and the version available on CPAN</a>. Other commits included <a href="https://github.com/garu/mojolicious-plugin-serverstatus/commit/794165234d30acd35720ce19564dc59d6b057252" rel="nofollow" target="_blank">updating the README</a>, setting up the <a href="https://github.com/garu/mojolicious-plugin-serverstatus/commit/9d7658478fb92a6a86fc4cca647386b59e288b40" rel="nofollow" target="_blank">proper dependencies</a> (which should fix current failure reports from CPAN Testers), <a href="https://github.com/garu/mojolicious-plugin-serverstatus/commit/15f4bacc2301c27005b131208581958e81a9ff1d" rel="nofollow" target="_blank">adding a Changes file</a> which was missing from the dist, and some minor pod fixes.<br />
<br />
That's it! Hopefully those commits and pull requests will be useful to the authors (and users too). And now I can't wait to see what Neil Bowers have picked for me next month :)<br />
<br />
<br />garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com154tag:blogger.com,1999:blog-7734799596325955005.post-70055517369673163782015-03-14T20:39:00.000-03:002015-03-15T01:59:15.990-03:00How to add online code badges to your Perl projects<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsYBoPvHab-EDxD92jfzZQYCSgQBMWgEH-YcyGzbRfWCO9H3_VHN0mzqehf3F_cehOwKyp4lSESg2pg2tq_KIbDiX_fpydYyDyvrO1f3wxam0BtaLYt4cl9UhkYAQhz0wrgkenO_nuFmqF/s1600/oprah-badges.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsYBoPvHab-EDxD92jfzZQYCSgQBMWgEH-YcyGzbRfWCO9H3_VHN0mzqehf3F_cehOwKyp4lSESg2pg2tq_KIbDiX_fpydYyDyvrO1f3wxam0BtaLYt4cl9UhkYAQhz0wrgkenO_nuFmqF/s1600/oprah-badges.jpg" height="320" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
If you hang around Github you might have seen a lot of projects adding extra information to their README files in the form of badges, like so:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBhMmUk1mbn7rydlPAmOVNQ1PfxPNzp5eofJLf4eBl_wFjNrvMC07hH6iCKU57BdtHZejIuSmIwGu57ugRyJVZcz0KUU9VH-i4hpjTQaQKu7g_WGoEttnAsRlj9JwNW4fY6GQWLICRoK2h/s1600/readme_badges_on_github.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="screenshot of badges shown on Clone's README file" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBhMmUk1mbn7rydlPAmOVNQ1PfxPNzp5eofJLf4eBl_wFjNrvMC07hH6iCKU57BdtHZejIuSmIwGu57ugRyJVZcz0KUU9VH-i4hpjTQaQKu7g_WGoEttnAsRlj9JwNW4fY6GQWLICRoK2h/s1600/readme_badges_on_github.png" height="211" title="code badges on the Clone perl distribution's README" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Not only do they make your project's Github page look cooler, they also help developers, from curious potential users to regular contributors, easily spot how active and healthy is the code.<br />
<br />
Wanna join in on the fun? There are several free code badges out there for you to use, and these are the ones (that I know of) that work for your awesome Perl code! \o/<br />
<br />
<h3>
Travis CI</h3>
<br />
Travis CI is a continuous integration service used to build and test projects hosted on Github. They'll let you know whether your code builds and tests pass in many different versions of perl (but, unlike CPAN Testers, they'll do it in only one platform). Using their service is super simple:<br />
<br />
<b>1.</b> Go to the <a href="https://travis-ci.org/" rel="nofollow" target="_blank">Travis CI homepage</a> and sign in with your Github account. It's the big link in the top right corner of the page, you can't miss it :)<br />
<br />
<b>2.</b> If this is your first rodeo, you'll see Travis CI asks for some permissions on Github. You must allow it to proceed. They have outlined the <a href="http://docs.travis-ci.com/user/github-oauth-scopes/" rel="nofollow" target="_blank">whys and hows</a> if you're feeling cautious.<br />
<br />
<b>3.</b> Go to your <a href="https://travis-ci.org/profile" rel="nofollow" target="_blank">Travis CI profile page</a> and wait for all your repositories to sync. Once they're all listed in there, it should look something like this (with, of course, your own name, groups and projects):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTpqNUkl1vvtBQ6u3tljYeTftmjkENyG6Ag4PxhJFdotVC55zfnqn6eZrQJPeuAbuI2zJ4j0N_oarANi-yMBIEvL4NzSTl_06qkQn1lDuTi28-2gL_-qmRkAlh81r81k57dVDivIARl6pJ/s1600/travis-ci+profile.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTpqNUkl1vvtBQ6u3tljYeTftmjkENyG6Ag4PxhJFdotVC55zfnqn6eZrQJPeuAbuI2zJ4j0N_oarANi-yMBIEvL4NzSTl_06qkQn1lDuTi28-2gL_-qmRkAlh81r81k57dVDivIARl6pJ/s1600/travis-ci+profile.png" height="195" width="640" /></a></div>
<b> 4.</b> See that "on-off" switch next to each of your repositories? Just flick the ones you want to have a Travis CI report. We're almost done!<br />
<br />
<b>5. </b>Add a file named <b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">.travis.yml</span></span></b> to the root of your project repository (note the "." in front of the filename!). It should contain valid YAML with the main language and the different versions of Perl 5 you want to test against. For example, if you want to test against 5.14 and 5.20, your ".travis.yml" should look like this:<br />
<br />
<pre>language: perl
perl:
- "5.14"
- "5.20"</pre>
<br />
If you need any extra information or customization of your perl builds, just read <a href="http://docs.travis-ci.com/user/languages/perl/" rel="nofollow" target="_blank">Travis CI's Perl specific documentation</a>. Note that if something goes wrong (e.g. you make a typo in the filename or its contents), Travis will assume you're testing against the current stable version of Ruby, which is definitely not what you want :)<br />
<br />
A few moments after you commit it to your repository and push it to Github, go back to your Travis CI profile page and you should be able to see the build results! If you skipped a step and added the ".travis.yml" file to your repo <i>before</i> enabling the project in the Travis CI page, just push any commit to trigger it.<br />
<br />
<b>6. </b>Badge time! Make sure your README file is in Markdown - just rename it to README.md and <a href="https://help.github.com/articles/github-flavored-markdown/" rel="nofollow" target="_blank">adjust it as you see fit</a> (it's also a great way to make your project stand out while still making it readable as plain text). Then go to your Travis CI profile and click on the project you want to add the badge. You should see the badge right next to the project's name. Click on it and it's going to let you copy the badge for your project in several formats:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh7LD6FjiQ5Bv4KCPjXqgXkU_RwHvq_b26-GanJVXehTGZYNivRg5fyj9kU5KwKTgf1YZFSgYrNjpGiPfkh_R3iuT3CL-k0SgO0Lr3cg6TGLuDZvpYcGKUbN49fZsaXt4IoCeSyNqXjvQ0/s1600/travis-badges.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh7LD6FjiQ5Bv4KCPjXqgXkU_RwHvq_b26-GanJVXehTGZYNivRg5fyj9kU5KwKTgf1YZFSgYrNjpGiPfkh_R3iuT3CL-k0SgO0Lr3cg6TGLuDZvpYcGKUbN49fZsaXt4IoCeSyNqXjvQ0/s1600/travis-badges.png" height="202" width="400" /></a></div>
<br />
<pre></pre>
Choose "Markdown" and paste it on your README.md file. The one from Clone, as you can see from the picture above, looks like this:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[![Build Status](https://travis-ci.org/garu/Clone.svg?branch=master)](https://travis-ci.org/garu/Clone)</span></span><br />
<br />
After pushing your changes, go to your project's Github page and see the badge in all its glory!<br />
<br />
<h3>
Coveralls</h3>
<br />
Now that we have Travis CI doing some tests for us, how about we get some test coverage reports also? That's where coveralls.io comes in!<br />
<br />
<b>1 & 2.</b> Just like we did with Travis CI, go to the <a href="https://coveralls.io/" rel="nofollow" target="_blank">Coveralls home page</a> and sign in with Github, granting them access to your repositories.<br />
<br />
<b>3. </b>The <a href="https://coveralls.io/repos" rel="nofollow" target="_blank">Coveralls repository page</a> will list all projects being analyzed for coverage, and now is probably the time to click the "<a href="https://coveralls.io/repos/new" rel="nofollow" target="_blank">add repos</a>" button on that page and add the ones you want coverage analysis of.<br />
<br />
<b>4. </b>Adjust your <span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">.travis.yml</span></span> file to add code coverage. Coveralls is engine agnostic so we'll use the not nearly enough praised <a href="https://metacpan.org/pod/Devel::Cover" target="_blank">Devel::Cover</a> suite to do the hard work, together with the <a href="https://metacpan.org/pod/Devel::Cover::Report::Coveralls" rel="nofollow" target="_blank">Devel::Cover::Report::Coveralls</a> interface. Basically, Travis CI gives us a lot of granularity while building and testing our projects, so we tweak it to include coverage commands in the appropriate build steps.<br />
<br />
There are a few ways to go about it: in the manual way we export the environment variables we need and install the coverage dependencies. For instance, we could update our file above to look something like this:<br />
<br />
<pre>language: perl
perl:
- "5.14"
- "5.20"
install:
- export RELEASE_TESTING=1 AUTOMATED_TESTING=1 AUTHOR_TESTING=1 HARNESS_OPTIONS=c HARNESS_TIMER=1
- cpanm --quiet --notest Devel::Cover::Report::Coveralls
- cpanm --quiet --notest --installdeps .
script:
- PERL5OPT=-MDevel::Cover=-coverage,statement,branch,condition,path,subroutine prove -lrsv t
- cover
after_success:
- cover -report coveralls</pre>
<br />
<br />
in the automatic way, we delegate most of the work to some fine-tuned helper scripts created just for Perl projects on Travis and Coveralls. The same original .travis.yml file would, in this case, look like this:<br />
<br />
<pre>language: perl
perl:
- "5.14"
- "5.20"
matrix:
include:
- perl: 5.20
env: COVERAGE=1
before_install:
- eval $(curl https://travis-perl.github.io/init) --auto
</pre>
<br />
<br />
To me this one looks much easier to read, as most of the complexity is enclosed in the "init" script of the <a href="https://github.com/travis-perl/helpers" rel="" target="_blank">well maintained travis-perl project</a>. I highly recommend it. In fact, after you get it right for your code, I suggest you <a href="https://github.com/travis-perl/helpers" rel="nofollow" target="_blank">go read their helper intro</a> and play with some settings, you won't regret it. Also, check out <a href="https://github.com/moose/Moo/blob/master/.travis.yml" rel="nofollow" target="_blank">Moo's .travis.yml file</a> for a glimpse of all the cool stuff you can get, from testing against blead perl to reporting on a specific irc channel!<br />
<br />
<b>5.</b> Now that your commits are tested on Travis CI and reported by Coveralls (mind you, it might take several minutes for a build coverage to show up, and they only start after you push to Github *after* having activated Coveralls and pushed your .travis.yml file), let's put a badge on your README!<br />
<br />
On the project listings on Coveralls, click on the project to go to its page, and you should see a badge right at the top, with a "BADGE URLS" link next to it. Click on that link to copy your badge in several different formats, like so:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI8_M80X8vQfGRZMJiJ8pgwQZwBBixlpisF6C8c18Nt07nh6pvHSEgb_YWkT79vOuuiBU45-t60ZlR0Z9ZO18PSkav2fRXXEUg-QXIc8-DV47GmgT6WF286Oi16EhetT2qyep8JY-nYkCh/s1600/coveralls-badges.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI8_M80X8vQfGRZMJiJ8pgwQZwBBixlpisF6C8c18Nt07nh6pvHSEgb_YWkT79vOuuiBU45-t60ZlR0Z9ZO18PSkav2fRXXEUg-QXIc8-DV47GmgT6WF286Oi16EhetT2qyep8JY-nYkCh/s1600/coveralls-badges.png" height="166" width="400" /></a></div>
<br />
Put the markdown code on your README.md file next to the Travis CI badge (or wherever you see fit) and that's it!<br />
<br />
<h3>
Version badge</h3>
<br />
This one really comes in handy for Github, as it lets your users know <i>exactly</i> what's the current stable version on CPAN and how to get it, and it's also by far the easiest to set up: just go to the <a href="http://badge.fury.io/for/pl" rel="nofollow" target="_blank">Version Badge link for Perl projects</a> and type in the name of your target dist (note that it's The-Distribution-Name, not The::MainModule::Name). Once you click on "Find", it's going to give you the badge in several different formats ready for use:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo1pAn08iSLilSYXMX-C7IzuM2Ghn5OSvbXx_OHg577b5SctwH-wBdZSjCIDnWss_VDwTjyJNK2vNNUVUD8Andz5NJGe5twlHChdkGS0hL6Vf7Thzx6sgtjaBzTQSoc04bsnooJNi6g51k/s1600/version-badges.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo1pAn08iSLilSYXMX-C7IzuM2Ghn5OSvbXx_OHg577b5SctwH-wBdZSjCIDnWss_VDwTjyJNK2vNNUVUD8Andz5NJGe5twlHChdkGS0hL6Vf7Thzx6sgtjaBzTQSoc04bsnooJNi6g51k/s1600/version-badges.png" height="207" width="400" /></a></div>
<br />
<h3>
Showing your badges on MetaCPAN</h3>
<br />
Now that your README.md is all shiny and colorful with badges, your project's Github page is starting to look even cooler than the MetaCPAN page, and that's just not cool. MetaCPAN's web interface is awesome and it will look even better when you put your brand new badges in it, so let's get on with that.<br />
<br />
<a href="http://perldoc.perl.org/perlpod.html" target="_blank">Perl's Pod format</a> allows us to to specify sections that will only show when a given format is supported. For instance, if you write this in your pod:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">=for html</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><img src="http://example.com/path/to/some/image.png" /></span></span><br />
<br />
Then this block will render the image when the renderer supports html (like the MetaCPAN web interface), and not do anything on renderers that don't support it (like your command line "perldoc"). Pretty cool, right? <a href="https://metacpan.org/pod/Chart::Clicker" rel="nofollow" target="_blank">Graphic modules</a> and <a href="https://metacpan.org/pod/Dancer::Plugin::Auth::Google" rel="nofollow" target="_blank">tutorial-like documentation</a> have been taking advantage of this feature for years, and we should too!<br />
<br />
So go to the links above and find the HTML version of the badges, then put them in a "=for html" paragraph at the top of your Pod. For the Clone module they look like this:<br />
<br />
<pre>=head1 NAME
Clone - recursively copy Perl datatypes
=for html
<a href="https://travis-ci.org/garu/Clone"><img alt="Build Status" src="https://travis-ci.org/garu/Clone.png?branch=master" /></a>
<a href="https://coveralls.io/r/garu/Clone?branch=master"><img alt="Coverage Status" src="https://coveralls.io/repos/garu/Clone/badge.png?branch=master" /></a>
<a href="https://metacpan.org/pod/Clone"><img alt="CPAN version" src="https://badge.fury.io/pl/Clone.svg" /></a>
=head1 SYNOPSIS </pre>
<pre> </pre>
<pre> ... </pre>
<br />
As soon as you push the new version to CPAN, you'll see the badges right there on MetaCPAN!<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7dRdGC0YpOAKblqJgWTiTQH8KcZWtz3bF_A2-XoU0gdfxt1P4Hhy2hXkNWwJe9h5qjx-n98fxcySxucJ4rcftayGxS-zuUFEdcC-_SJJ0c9mPENT5KpNUGYnugLGBg48UYE1aI4zWrp01/s1600/badges-metacpan.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7dRdGC0YpOAKblqJgWTiTQH8KcZWtz3bF_A2-XoU0gdfxt1P4Hhy2hXkNWwJe9h5qjx-n98fxcySxucJ4rcftayGxS-zuUFEdcC-_SJJ0c9mPENT5KpNUGYnugLGBg48UYE1aI4zWrp01/s1600/badges-metacpan.png" height="180" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
If you are too lazy to go back and copy the HTML version from all those sites, just run the following one-liner on your README.md to print the html version of the markdown links in there:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">perl -nE 'BEGIN{ say q(=for html) } say qq(<a href="https://www.blogger.com/$3"><img alt="$1" src="$2" /></a>) if /\[!\[([^\]]+)\]\(([^\)]+)\)\]\(([^\)]+)\)/' README.md</span></span><br />
<br />
Then copy the block to your pod and make a new CPAN release :)<br />
<br />
That's all there is to it. Have fun with your badges! \o/<br />
<br />(oh, and let me know if you find any other Perl-related badges you know of)<br />
<br />garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com20tag:blogger.com,1999:blog-7734799596325955005.post-43882128771122512162015-02-28T20:05:00.000-03:002015-02-28T20:53:47.294-03:00My February CPAN PR Challenge: Template::Plugin::AutoformatFor this month's CPAN Pull Request Challenge I was assigned with <a href="https://metacpan.org/pod/Template::Plugin::Autoformat" target="_blank">Template::Plugin::Autoformat</a>, a module that lets you easily format text and numbers in your <a href="https://metacpan.org/pod/Template" target="_blank">Template Toolkit</a> templates, using Damian Conway's excellent <a href="https://metacpan.org/pod/Text::Autoformat" target="_blank">Text::Autoformat</a>.
If you ever needed to adjust text right/left/center justification,
alignment, capitalization, bullets, indenting, without being able to
resort to CSS - for example, if your templates are not for HTML or if
said text is inside a <pre> tag - this module could make your life
much easier!<br />
<br />
<h4>
A different challenge</h4>
<br />
It
was an unusually busy month for me and I didn't get a chance to tackle
it until yesterday - I even got Neil's "One week left!" email reminder,
which was nice. Even so, I figured it would be ok, because the original
PR Challenge email mentioned this module had several CPAN Testers FAIL
reports, CPANTS issues, and hadn't seen an update in several years.<br />
<br />
Except now when I finally checked it out and it saw it was last released a month ago, had <b>zero</b>
failures on CPAN Testers, no open issue on either RT or Github, no
CPANTS issues, pristine documentation, even complete META resource
information! I thought I had been assigned to a dist needing help, but
instead what I was looking at was a
stable and well-maintained one.<br />
<br />
As it turns out,
Template::Plugin::Autoformat hadn't seen a single update between 2008
and 2014, when it was adopted by Peter Karman. Peter started making
several developer releases until he was satisfied with the results, and
released a stable version in January 2015 (which is probably why it was
still in the CPAN PR Challenge's list, created prior to said release).
His new version fixed all open issues, had a great test coverage and
felt like one of those modules that do one thing and do it very well.<br />
<br />
And
now I had 1 day to send a nice pull request to a module that looked
like it needed no pull requests, or I'd lose the challenge :X<br />
<br />
<h4>
Starting small</h4>
<br />
Okay, instead of being caught in <a href="https://en.wikipedia.org/wiki/Analysis_paralysis" rel="nofollow" target="_blank">analysis paralysis</a>, I cloned the repo and looked for low hanging fruits. Turns out there were some!<br />
<br />
<ol>
<li><i>The copyright year was still 2014</i>.
This is the first place I look because it's also the first place I
overlook in my own projects :) It's such a simple patch that it almost
feels like cheating, but you have to start somewhere, right? <a href="https://github.com/karpet/template-plugin-autoformat/pull/2" rel="nofollow" target="_blank">Done</a>.</li>
<li><i> The README was not in Markdown</i>.
I love markdown READMEs, because they make the Github project page look
*so* much nicer without compromising reading it from the terminal. Even
better, "README.md" is fully supported by PAUSE & CPAN \o/. As I
was making the conversion, I noticed the README's contents were just a
copy of the pod, so I tweaked it a bit to include installation
instructions and just a teaser pointing to the full docs, online and via
perldoc. This is a good thing for the developer too, as there's less
duplicate content to worry about. <a href="https://github.com/karpet/template-plugin-autoformat/pull/3" rel="nofollow" target="_blank">Done</a>.</li>
<li><i>The distribution did not declare a minimum perl version</i>. <a href="http://cpants.cpanauthors.org/" target="_blank">CPANTS Kwalitee</a>
is a terrific free service for the Perl community, letting users and
authors know whether a given module passes or fails several quality
assurance metrics. While, as I mentioned before,
Template::Plugin::Autoformat passed all core CPANTS metrics, this extra
metric was not being met. In fact, it was the <i>only</i> extra metric not being met. Thankfully, the excellent <a href="https://metacpan.org/pod/distribution/Perl-MinimumVersion/script/perlver" target="_blank">perlver</a>
tool makes it very easy to find the minimum perl version for your
module or app. It reported 5.6.0 as being the minimum version so, after a
very simple addition to the Makefile.PL, I had my <a href="https://github.com/karpet/template-plugin-autoformat/pull/4" rel="nofollow" target="_blank">third pull request of the night</a>.</li>
<li><i>The Changes file was not fully compliant with the <a href="http://changes.cpanhq.org/" target="_blank">CPAN::Changes spec</a></i>.
This was also an easy one to fix, since the only standing issue was
formatting the release dates to something CPAN::Changes would
understand. <a href="https://github.com/karpet/template-plugin-autoformat/pull/5" rel="nofollow" target="_blank">Next</a>!</li>
<li><i>Test coverage was almost 100%, but not exactly 100%</i>.
This is another great way to help other projects: check the code
coverage and see if you can improve it in any way. In this case, after
running the great <a href="https://metacpan.org/pod/Devel::Cover" target="_blank">cover</a>
tool, I found out it had 100% statement coverage, but 50% pod coverage
and 91.6% branch coverage. The pod coverage was actually a mistake -
there was a private function being counted as public. Adding the missing
branch test was also pretty straightforward. <a href="https://github.com/karpet/template-plugin-autoformat/pull/6" rel="nofollow" target="_blank">After the patch</a>, Template::Plugin::Autoformat got 100% coverage in everything - which is pretty cool!</li>
<li><i>The "NAME" key in Makefile.PL had the distribution name, not the main package's name</i>.
Now, the builder is clever enough to do the right thing, but
nevertheless it was triggering a warning every time I ran "make" - which
was quite a bit while I played with test coverage. Easy fix again, just
s/Template-Plugin-Autoformat/Template::Plugin::Autoformat/ and I was <a href="https://github.com/karpet/template-plugin-autoformat/pull/7" rel="nofollow" target="_blank">done for the night</a>.</li>
</ol>
So after a couple of hours having fun with Template::Plugin::Autoformat, I had 6 PRs to show for on the PR Challenge. Woot! Best of all, just a few hours later Peter Karman merged all my PRs and made a new release \o/garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com3tag:blogger.com,1999:blog-7734799596325955005.post-55516006664302399192015-01-29T14:42:00.001-02:002015-04-30T17:25:08.366-03:00My CPAN Pull Request Challenge for January: Fuse<br />
So! Back in December I subscribed to <a href="http://blogs.perl.org/users/neilb/2014/12/take-the-2015-cpan-pull-request-challenge.html" target="_blank">Neil Bowers' CPAN Pull Request Challenge</a>. In a nutshell, throughout 2015 every participant will get an email in the first days of each month with a CPAN module that needs a little bit of love, and we have until the end of the month to submit at least one pull request for that module's Github repository.<br />
<br />
The module I got was "<a href="https://metacpan.org/pod/Fuse" target="_blank">Fuse</a>".<br />
<br />
<h3>
What is Fuse?</h3>
<br />
I must admit to my ignorance as I have never heard of Fuse before. So the first thing I did was jump to <a href="https://metacpan.org/pod/distribution/Fuse/Fuse.pm" target="_blank">Fuse's page on MetaCPAN</a> and have a look. Fuse is a Perl interface to the <a href="http://fuse.sourceforge.net/" target="_blank">FUSE library (Filesystem in USErspace)</a>, and lets you implement filesystems in Perl. Wow! That's pretty cool, right?!<br />
<br />
<h3>
Where to start</h3>
<br />
If Neil was pointing me to Fuse, it means there's probably work for me to do. So what I did was read the documentation, CPAN Testers reports, open issues and the Github page. Then I downloaded the source code and grep'd for tags like "FIXME" and "TODO". In the end it was a very well-thought distribution and I think the authors did - and are still doing - a pretty nice job. Still, this is what I thought I could help with:<br />
<ul>
<li>The (external) FUSE kernel/lib doesn't seem to be linked anywhere in the main doc, just on the README;</li>
<li>The SYNOPSIS and DESCRIPTION could be a bit more verbose - maybe I'm just not used to the FUSE library, but I felt a lot was being taken for granted;</li>
<li>The README (displayed on github) doesn't point to a lot of useful places in the Perl-sphere (other than the examples and how to install);</li>
<li>There is no license information on the main pod - though it's there on the META resources;</li>
<li>The latest version is not indexed for some reason;</li>
<li>There are a lot of FAIL and UNKNOWN reports on CPAN Testers.</li>
</ul>
<br />
<h3>
First things first</h3>
<br />
There were several small things for me to attempt here, so rather than making a huge bundled Pull Request for Fuse, I chose to compartmentalize them into smaller, separate, PRs. This way the authors'd probably be more comfortable reviewing my changes and I wouldn't depend on all of them being accepted. This is super easy with git and github: just create a branch from master and make the pull request from your specific branch to the author's master. This will let you easily go back to <i>their</i> master (instead of to the one you might have changed) and work on something else independently.<br />
<br />
<b>1. Doc fixes</b><br />
<br />
Since I was really short of free time this month, I decided to start with the lowest hanging fruit. So I created a "garu/doc_patches" branch and tried my best to improve on the existing documentation. I expanded the SYNOPSIS, put external links whenever I missed them, and did some minor tweaks here and there with the pod formatting to improve readability. I also moved the README to markdown so it looks awesome on Github while still being nice to read on the console. When I was satisfied, <a href="https://github.com/dpavlin/perl-fuse/pull/21" rel="nofollow" target="_blank">I sent out the pull request</a>.<br />
<br />
This was great and really helped me understand what Fuse was all about and how to use it. I recommend anyone trying to learn and contribute to a project to first read the docs and try to improve them whenever you find something you don't quite understand. Most of the time the ones writing the documentation are too familiar with the code and API so they can take a lot of it for granted.<br />
<br />
<b>2. WHY U NO INDEX?</b><br />
<br />
There was an open ticket saying 0.16.1 was not indexed. Upon further investigation, I saw versions 0.16_01 and 0.16.1 were in fact indexed, but available as if they were older releases. Why weren't they showing up as the latest? I went to #metacpan on irc.perl.org and asked around.<br />
<br />
As haarg++ pointed out, Fuse inadvertently mixed single dotted and double dotted version formats, releasing '0.16' (instead of '0.16.0') and '0.16.1'. When the CPAN indexer compares version numbers, 0.16.1 becomes 0.016001 and plain 0.16 becomes 0.160000, and as such, "0.16" is indeed greater than "0.16.1".<br />
<br />
While I believe <a href="http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/" target="_blank">version numbers should be boring</a>, I understand why some people go for the <a href="http://semver.org/" target="_blank">major.minor.revision semantic versioning format</a>. So I went ahead and filed a <a href="https://github.com/dpavlin/perl-fuse/pull/23" rel="nofollow" target="_blank">pull request bumping up the version to 0.160.2</a>, and another one that <a href="https://github.com/dpavlin/perl-fuse/pull/22" rel="nofollow" target="_blank">bumps it to 0.17</a>. Both numbers are greater than 0.16 so they'll definitely show as latest, and the authors can just pick whichever format they prefer and discard the other PR.<br />
<br />
<b>3. Making tests pass</b><br />
<br />
Finally, I noticed that all the UNKNOWN tags on CPAN Testers were there because FUSE was not installed. Implementing an Alien::FUSE module seems like a good idea, but it is a bit out of scope for the PR Challenge and the limited free time I had. So I went on and installed <a href="http://osxfuse.github.com/" target="_blank">FUSE for OS X</a> using <a href="http://brew.sh/" target="_blank">homebrew</a>. For my surprise, the Makefile.PL was still not finding it:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> $ perl Makefile.PL</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> Cannot build for platform: darwin</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> Please install OSXFUSE from http://osxfuse.github.com/</span></span><br />
<br />
I checked Makefile.PL's source and found out what was wrong: it's trying to find libfuse using the "pkg-config" tool. Although "pkg-tool" is rather ubiquitous in major Linux systems, my OS X did not have it. So a made <a href="https://github.com/dpavlin/perl-fuse/pull/20" rel="nofollow" target="_blank">another PR</a> that checks for the existence of either 'pkg-config' or 'ppkg-config' (a Pure-Perl alternative to 'pkg-config' available with the excellent <a href="https://metacpan.org/pod/PkgConfig" rel="" target="_blank">PkgConfig CPAN module</a>) early on the Makefile.PL, dying with an explanatory message if none are available. There's even an opportunity here to simply depend on PkgConfig and use the module version of the commands instead of relying on external "(p)pkg-config" tools, but I thought I rather wait a bit and see how well received this change is first.<br />
<br />
Now the module compiles on OSX, but I still can't make the tests pass. I dug a bit and found some commands like read_buf and write_buf are required for testing, but are only available in libfuse versions 2.9.0 and above. However, osxfuse seems to use a different version equivalence and the latest version (released just a month ago) is still 2.7.4. I couldn't find an osxfuse <=> libfuse version equivalence, and because of this, the Fuse module doesn't create the proper bindings for such functions and the tests fail. There might be other issues still, but I stopped there, <a href="https://rt.cpan.org/Ticket/Display.html?id=101739" rel="nofollow" target="_blank">filing a ticket</a> and hoping someone else will pick it up where I left off.<br />
<br />
<h3>
Wrapping up</h3>
<br />
I had a lot of fun finding out about Fuse and playing with it. By the end of January I was able to file 4 pull requests and 1 RT ticket to the main repo. I'm sad I wasn't able to get the tests to pass on OS X, but hopefully someone else will read this and be inspired :)<br />
<br />
I'd like to thank Neil for this awesome PR Challenge idea, Graham "plicease" Ollis for the great PkgConfig module and for quickly replying to and merging the small changes I proposed that allowed me to use it on Fuse, and Graham "haarg" Knop and everybody from #metacpan for their amazing support.<br />
<br />
Also, of course, a huge thank you to Dobrica Pavlinušić, Derrik Pates, Mark Glines and the entire Fuse team for such a great module, and for allowing me the opportunity to be a part of it.<br />
<br />
Can't wait to see which module I'll get next month! :)<br />
<br />garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com0tag:blogger.com,1999:blog-7734799596325955005.post-31085840020837591202014-04-06T14:36:00.001-03:002014-04-06T19:58:39.854-03:00Perl Dancer on Media Temple (gs)Recently I was asked by a friend to install Dancer on Media Temple
Grid Service (gs), and after I couldn't find a tutorial to do so, I
decided to write one myself :)<br />
<br />
Hopefully, you'll be
able to get up an running in seven easy steps. I am assuming you know
how to use remote *nix shells via ssh, editing files, etc.<br />
<br />
You should be aware that none of this is really supported by Media Temple so if you run into trouble or if something changes on the grid, you're on your own. For anything other than simple dynamic
websites (in PHP), Media Temple recommends their more robust (and expensive) dedicated
virtual (dv) server solution.<br />
<br />
<br />
<h4>
Step #1 - Login with SSH on Media Temple </h4>
<br />
At
the time of this writing, Media Temple's GS runs on Perl 5.10.1, which
is not very recent, but is good enough for us. Teaching you how to setup
ssh is a bit beyond the scope of this tutorial, but thankfully Media
Temple provides <a href="https://kb.mediatemple.net/questions/16/Connecting+via+SSH+to+your+server#gs" target="_blank">a very nice ssh guide</a>.<br />
<br />
Media Temple runs Apache, but error logging is not enabled by default, so you should probably <a href="https://kb.mediatemple.net/questions/732/Where+are+the+access_log+and+error_log+files+for+my+server%3F#gs" target="_blank">enable error_log on Media Temple</a>.
If you run into any trouble on the following sections of this tutorial,
following the error log (by something like running "tail -f
$HOME/../../logs/error_log" on another window) is definitely going to
help you!<br />
<br />
<h4>
Step #2 - Sanity check</h4>
<br />
After you log
in, you'll see Media Temple's domains come with 2 directories (at least
that's how they showed up to me): "cgi-bin" and "html". This structure
implies that dynamic content should be under cgi-bin and static content
should be under "html". Just to make sure everything is sane, up and
running, let's create a very simple pure-perl script and place it under
the "cgi-bin" directory:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> #!/usr/bin/perl</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> # ^^^ Media Temple requires the shebang! </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> use strict;</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> use warnings;</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> print "Content-type: text/html\n\n";</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> print "Hello, Media Temple";</span><br />
<br />
Save this file as "test.cgi" and set permissions to 700 (required, apparently):<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> chmod 700 test.cgi</span><br />
<br />
The owner of the file should be the main account for that domain as well:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> chown $USER:$USER test.cgi</span><br />
<br />
(where $USER is the username of the main account)<br />
<br />
You should also make sure the cgi-bin directory's permissions is set to exactly 755, otherwise things won't work.<br />
<br />
Now
try and run it from your web browser, by opening
"http://your-domain/cgi-bin/test.cgi", where "your-domain" is your Media
Temple domain. If you see an "Internal Server Error" message, try
checking out your error_log and review the previous steps (for example,
make sure the script is exactly as it is above, and all permissions are
right).<br />
<br />
<h4>
Step #3 - Installing Perl modules on Media Temple (mt) Grid</h4>
<br />
Media Temple provides a Knowledge Base tutorial on how to <a href="https://kb.mediatemple.net/questions/1657/Installing+Perl+modules+on+the+Grid" target="_blank">install Perl modules on the Grid</a>,
but it only lists manual installations which are boring and error
prone. After all, we live in the future, where it's simple to install
Perl modules as a user on a shared hosting service. All you have to do
is type the following on your server's command line (it's just one line,
and you can cut and paste as it is):<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">
curl -L http://cpanmin.us | perl - --local-lib=~/perl5 local::lib
App::cpanminus && eval $(perl -I ~/perl5/lib/perl5/
-Mlocal::lib)</span><br />
<br />
This is going to install local::lib
and cpanm into your home directory, and enable you to install any other
modules there by simply typing "cpanm My::Module" (where "My::Module"
is, of course, the name of the module you want to install).<br />
<br />
While you're at it, remember to add the line:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)</span><br />
<br />
to your ~/.bash_profile file (create it if necessary, of course). <br />
<br />
<h4>
Step #4 - Installing Dancer (and everything else!)</h4>
<br />
After the previous step, installing Dancer is easy as pie:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> cpanm Dancer</span><br />
<br />
Done! Let's also install Plack::Runner, in case we need it:<br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<span style="font-family: "Courier New",Courier,monospace;"> cpanm Plack::Runner</span><br />
<br />
You
can take this moment to install all your app's dependencies. For
instance, my friend's app is also using Template Toolkit and DBIx::Class<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> cpanm Template DBIx::Class</span><br />
<br />
<h4>
Step #5 - Making a default Dancer app (or moving your current one)</h4>
<br />
If
you already have a Dancer app, just move it to Media Temple's domain
directory. For example, if your Dancer app is called "my-app", move it
to: "/home/XXXXX/domains/mydomain.com/my-app" (replacing XXXXX and
"mydomain.com" to the appropriate values for your grid account).<br />
<br />
Otherwise, just go there (/home/XXXX/domains/mydomain.com) and create your Dancer app by typing "dancer -a appname".<br />
<br />
<br />
<h4>
Step #6 - Change "html" to a symlink:</h4>
<br />
Your
Dancer app's base directory is usually "appname/public", but Media
Temple forces you to have an "html" directory as base. So we remove the
original (just rename it instead if you're not brave enough :) and
create it again, only this time as a symbolic link to "appname/public":<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> cd ~/domains/mydomain.com</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> mv html html_old</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> ln -s myapp/public html </span><br />
<br />
<h4>
Step #7 - Add the appropriate .htacess files</h4>
<br />
Media
Temple runs Apache on the grid server, so we control what runs with
.htaccess files. This is the content we put in the file
"myapp/public/.htaccess":<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> # Allow /public to run Perl code</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> Options +ExecCGI +FollowSymLinks<br /> AddHandler cgi-script .cgi .pl</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<span style="font-family: "Courier New",Courier,monospace;"> # Initialize mod_rewrite</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> RewriteEngine On<br /> RewriteBase /<br /> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> # If file doesn't exist on the server, dispatch!<br /> RewriteCond %{REQUEST_FILENAME} !-f<br /> RewriteRule ^(.+)$ dispatch.cgi/$1 [L]</span><br />
<br />
<br />
At this point I bumped into trouble. Media Temple's Apache doesn't seem to let Perl see variables such as PERL5LIB. There's likely a clean way to fiddle with "SetEnv" on .htaccess to fix this (let me know if you get it working!), but what I did was add a "use lib" line on top of public/dispatch.cgi, like so:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#!/usr/bin/env perl</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">use 5.10.0;</span></span><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># Media Temple doesn't read our environment</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">use lib qw(</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> /home/XXXXX/users/.home/perl5/lib/perl5</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> /home/XXXXX/users/.home/perl5/lib/perl5/x86_64-linux-gnu-thread-multi</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">);</span></span><br />
<br />
That's
the basic setup! If everything went well, you should be able to point
your web browser to your domain and see Dancer's main page \o/<br />
<br />
You
should notice we're running Dancer on standard cgi, which means it's
going to be somewhat slow, specially when loading modules.<br />
<br />
<h4>
Appendix: Perl with FastCGI on the Media Temple Grid</h4>
<br />
Sadly, Media
Temple doesn't seem to provide proper FastCGI support for Perl - at
least from my understanding. Of course, that didn't stop me from trying, so here's what I did:<br />
<br />
First, <a href="https://kb.mediatemple.net/questions/1890/How+do+I+enable+FastCGI%3F#gs" target="_blank">enable PHP FastCGI on the GS</a>. It should have created a .htaccess in your domain root (i.e. the parent of your "html" dir) with some basic FastCGI settings. I changed them to this:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> # BEGIN (mt) controlled settings<br /> <IfModule !mod_fcgid.c><br /> AddHandler cgi-script .cgi .pl<br /> </IfModule><br /> <IfModule mod_fcgid.c><br /> AddHandler fcgid-script .fcgi<br /> <Files *.fcgi><br /> Options +ExecCGI<br /> </Files><br /> </IfModule><br /> # END (mt) controlled settings</span></span><br />
<br />
(this is basically their default script, with "php" replaced with "cgi", "pl" and "fcgi"). <br />
<br />
Then I went to our own html/.htaccess file (it's a symlink to myapp/public/.htaccess, remember?) and replaced "dispatch.cgi" with "dispatch.fcgi" on the rewrite rules described in <i>step 7</i> above. Finally, I updated the file "dispatch.fcgi" to include the same "use lib" I did for dispatch.cgi, deleted dispatch.cgi and voilá :) <br />
<br />
<h4>
Done!</h4>
<br />
Again, Media Temple recommends that any
serious app go to their dedicated virtual server (dv) solution. Still,
the current gs setup should be enough for you to have some fun and play
around with possibilities before moving to a more expensive plan.<br />
<br />
There
are tons of other cool things you can do, such as creating remote git
repositories and making hooks to do automatic deploys, but that's a bit
out of the scope of this tutorial :)<br />
<br />
Have fun, and happy Perl hacking!garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com2tag:blogger.com,1999:blog-7734799596325955005.post-81903414808596182622013-07-08T10:27:00.000-03:002013-07-08T11:02:36.567-03:00Scala for Perl 5 Programmers<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVbe9E-_Uiduly3SwHjffpButuRhd16IECEKYyWWcHkW4eUVVQxyvPIJGgEm8ZjW8efUMxppP5huSlaepDBv55sDzLTORmnhcZkgZfW66jUt36ni7uVSkEwFG0Am8l26zVD-1RGkt11T8a/s1600/scala-loves-perl-loves-scala.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="153" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVbe9E-_Uiduly3SwHjffpButuRhd16IECEKYyWWcHkW4eUVVQxyvPIJGgEm8ZjW8efUMxppP5huSlaepDBv55sDzLTORmnhcZkgZfW66jUt36ni7uVSkEwFG0Am8l26zVD-1RGkt11T8a/s320/scala-loves-perl-loves-scala.png" width="320" /></a></div>
<br />
<br />
Maybe you want to contribute to the <a href="https://github.com/MoeOrganization/moe">Moe</a> project.
Maybe you want to improve your <a href="http://perl.org/">Perl programming</a> skills by stepping out
of your comfort zone - after all, learning new languages is generally considered A Good Thing™. Maybe you're doing it just for kicks, or as a
second language, or... well, it doesn't really matter.<br />
<br />
When I decided to learn a bit of Scala earlier this year, I was devastated to find that
most tutorials are for people coming from Java. Well, I'm not really a
Java person, so I decided to write a <a href="https://github.com/garu/scala-for-perl5-programmers">Scala tutorial for people with mostly a Perl 5 background</a>. As I was learning (and writing), I realized Scala
feels <i>very</i> Perlish, with anonymous methods, more than one way
to do things, weird operators and even a context variable "_" (looks familiar?) <br />
<br />
If you're interested, take a look and let me know what you think. It's all on Github, written in their flavored Markdown syntax. And if you find any mistakes - hey, I'm learning too! - or if you have interesting additions to the tutorial, just send me a pull request :)<br />
<br />
Happy hacking!garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com3tag:blogger.com,1999:blog-7734799596325955005.post-65947103844109250402013-06-29T05:01:00.000-03:002013-06-29T05:01:02.705-03:00YAPC::NA 2013 ROCKED!<i>[Sorry for the delayed post. I wanted to release this right after the <a href="http://www.yapcna.org/yn2013/">YAPC::NA</a> but just a few days after I got back to my country we got kinda <a href="http://youtu.be/W6QVLE8PQJ8">in the middle of something</a>.]</i> <br />
<br />
In the live music capital of the world, over 400 Perl hackers from 18 countries got together a few weeks ago for Yet Another Perl <strike>Concert</strike>Conference. If you're not familiar with <a href="http://www.perl.org/">Perl</a> and its amazing culture, you might think I'm exaggerating as I struggle to find the proper adjectives to describe just how remarkably incredible it was. So, instead, I'm going to describe a few of the things that happened there and how they unfolded from my own perspective. Since everyone's experience is a bit different, I look forward to seeing your post too!<br />
<br />
tl;dr - If you've never been to a YAPC before, I strongly recommend you do so. You'll never forget it.<br />
<br />
<h3>
Nothing Like a Little Rock 'n' Roll Before The Conference Starts</h3>
I really enjoy Rock/Jazz/Blues, so Austin is one of the great places for me to be. I was a bit sad though knowing that <a href="http://www.montemontgomery.net/" target="_blank">Monte Montgomery</a>, one of my all-time favorite guitarists, and one pretty active in the Austin scene, was not giving a concert while I'd be in town. I even bitched about it on Twitter, like you're supposed to do. And guess what? Just a couple of days before my trip, and two weeks <i>after</i> my rant, <a href="http://www.nuttybrown.com/" target="_blank">Nutty Brown Cafe</a> replied to my tweet and made my trip even more worthwhile! <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc7ZSxm2pXZhhH2c2m_jK9n-UXqJjZEO2-jGFIOHbHgbadP5N0AWo02gAxBXOua-XU6rpeNBxuLx45GtLqB0xxcUVwjxUsL8ql0QArmVehOX6tZESfMn1ituDDA-zEmRxWYeVTD1Ojl-K1/s1600/Screen+Shot+2013-06-11+at+4.37.25+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc7ZSxm2pXZhhH2c2m_jK9n-UXqJjZEO2-jGFIOHbHgbadP5N0AWo02gAxBXOua-XU6rpeNBxuLx45GtLqB0xxcUVwjxUsL8ql0QArmVehOX6tZESfMn1ituDDA-zEmRxWYeVTD1Ojl-K1/s400/Screen+Shot+2013-06-11+at+4.37.25+AM.png" width="400" /></a></div>
<br />
I was really excited, and it was even more than I hoped for! Nutty Brown is a great place, with great beer and an awesome open air stage in the back. And Monte is even better live! Seriously, I tried to find the person behind the <a href="https://twitter.com/nuttybrowncafe" target="_blank">@nuttybrowncafe</a> to thank her (they told me it's a "she") personally, but she wasn't there at the time. I dreamed of seeing this dude perform live for years, and if not for that single tweet I might never have. I guess this whole social network thing works, eh?<br />
<br />
But I digress. Back to the conference!<br />
<br />
<h3>
Arrival Dinner</h3>
The arrival dinner was at a place called the <a href="http://hulahut.com/" target="_blank">Hula Hut</a>, serving us some great drinks and TexMex food "with a surfer twist". I'm not really sure what that means but food was delicious, and I think everybody had a great time. I know I did!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMpmxYfiKYjQ4ITRAdJKpuy-g6e4dWLMAkBzCAqi3U33Bh0zbgy4H7-QhG7eIATbsvkKlCjhITnP-5AtjhqqeUAN10HzMJEV6orr1uhgrcTFRJc9ipwpQz3zy02jQoE1DUiiCEyZ43lezH/s1600/hula+hut.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMpmxYfiKYjQ4ITRAdJKpuy-g6e4dWLMAkBzCAqi3U33Bh0zbgy4H7-QhG7eIATbsvkKlCjhITnP-5AtjhqqeUAN10HzMJEV6orr1uhgrcTFRJc9ipwpQz3zy02jQoE1DUiiCEyZ43lezH/s1600/hula+hut.jpg" width="320" /></a></div>
<br />
<h3>
Hook 'em Horns!</h3>
The venue was in the <a href="http://www.utexas.edu/" target="_blank">University of Texas</a>, home of the <a href="http://www.texassports.com/" target="_blank">Texas Longhorns</a>, a very engaging athletics program for students. Everywhere you looked you'd see someone wearing one of their orange t-shirts. It always amazed me how the USA is so into sports (not just american football, but every single sport they can find), and now I got to see that passion first hand. It might be a no-brainer for you, but as a brazilian, I know my country mostly just cares about football, and even so we don't have our college competitions shown on prime time (or any time, for that matter).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgot2d2n51gsjPVYBLMuEFr1LoFYEb4moyVbbT_iM0GX2CDuxrJ9_E0O4ft1MnoGbaK_Vnx6CCNmDh-_r2_VSfHOWoAR1Pu06DQXA1-SbyHVM3HND5XQ-NDAW8wRmRQuIRHK4kH_HTrx9xB/s1600/hook+%27em+horns.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgot2d2n51gsjPVYBLMuEFr1LoFYEb4moyVbbT_iM0GX2CDuxrJ9_E0O4ft1MnoGbaK_Vnx6CCNmDh-_r2_VSfHOWoAR1Pu06DQXA1-SbyHVM3HND5XQ-NDAW8wRmRQuIRHK4kH_HTrx9xB/s1600/hook+'em+horns.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Also, as a metal fan, the "Hook 'em Horns" hand gesture was quite familiar (and a bit funny to see in statues and such).<br />
<br />
<h3>
Christmas in June</h3>
One of the reasons I look forward to the YAPC every year is because I get to see a lot of the good friends I made over the years in the Perl community, friends I share a lot in common with but whom I get to see only once or twice a year, if I'm lucky. Being able to hang out with people like sawyer, auggy, ribasushi, perigrin, sartak, ingy, liz, wendy, apeiron, abigail, frew, dha, stevan, genehack, rjbs, jayhannah, hobbs, karen pauley, hugmeir, mdk, mst, nperez, drolsky, jim keenan, nick patch, paul mantz, scrottie and <i>so many others</i>... just being next to these great, fun and sparkling minds already makes this giant trip worthwhile.<br />
<br />
I also had the opportunity to meet other great people, some of which I only knew online. Tobias Leich (FROGGS) has been a partner in crime in the Perl SDL project for several years now, but this was the first time we met in person. He showed me a few pictures of his kid and we talked about some of his cool new Perl 6 hacking. He's not only a great guy but an excellent hacker, even more awesome in person than I expected - and I have pretty high standards! =P<br />
<br />
I also spotted the great Tokuhiro Matsuno next to (the also great) Xaicron on the first day and introduced
myself, since I'm a big fan of his stuff. I actually mixed them
together at first (ごめんね!!) but I blame it all on Xaicron's
remarkable orange glasses, which I remembered from his gravatar. I also
let Matsuno-san know about a recent issue some people were having when
trying to report test results for his <a href="https://metacpan.org/module/Minilla" target="_blank">Minilla</a>
app to CPAN Testers through cpanm-reporter, and he fixed it on the same
day! Wow! A few days later at the speaker's dinner I'd be laughing with
them (and Karen Pauley, and Shawn) about some very weird (miss)translations we
have between languages such as portuguese and japanese. I only talked
to them briefly but I hope they've has as much of a good time as I had,
and hope to see them again (and even more Japanese developers) on future
editions of YAPC::NA.<br />
<br />
Other great people I met there for the first time whom I'd only talked to online included <span title="">Naveed "Ironcamel" Massjouni</span> and Al Newkirk. Al was in fact one of the first people I interacted with over on irc.perl.org, so I was really glad to finally meet him. Oh! And at last I got to met Karen Etheridge, who's been stalking me online for several months now. Fine, fine, <i>I</i> was the one stalking her - it was driving me mad that all of a sudden she was the release manager of a ton of modules I loved and used on a daily basis and yet I had no idea who she was! Turns out she's not only a great developer but also a very nice person, so yay!<br />
<br />
I really can't explain it. There's something about the Perl community
that feels like family - for better or worse. So, to me, attending the
YAPC is like walking into one big Christmas party. I just love it! :-)<br />
<br />
As any family this big, I missed a lot of people who couldn't be there this year,
and hope to see them in other conferences or back at the YAPC::NA next
year!<br />
<br />
<h3>
CGI.pm is Dead. Long live CGI.pm!</h3>
One of the (many) interesting highlights of this year's conference was the whole <a href="http://www.gossamer-threads.com/lists/perl/porters/293768?do=post_view_threaded" target="_blank">discussion</a> of CGI.pm - specifically whether it should be removed from the Perl 5 core or not. SawyerX did a lightning talk making a strong case for "killing" CGI.pm. Perrin Harkins, on the other hand, came up on stage with a lovely tribute to all the great stuff that CGI.pm acomplished back in the day and bid it a fond farewell from the core. Later on the conference, Casey West went totally the other way, not accepting CGI.pm's fate/doom in a very funny rendition of his arguments which included sarcasm, the shortest wiki in the world and doing a handwalk on stage wearing nothing but a swimsuit!<br />
<br />
<h3>
The Keynotes</h3>
Mark "mdk" Keating gave the first keynote of the conference which secured his <i>Diva</i> status in the Perl community with a brilliant, brilliant talk called <a href="http://youtu.be/92sKmO-AHZQ">Perl of Christmas Past</a>, in which he dwells on the history of the language and other fun facts. For example, did you know that Perl 1.0 was released on the very same day as Final Fantasy 1?! Did you know Perl has been used in Mars? I don't think I'll ever forgive myself for not making it in time to watch it live, but thankfully the conference recorded it so I was able to watch it afterwards, and you should too!<br />
<br />
In the evening, Larry Wall gave an <a href="http://new.livestream.com/accounts/3585172/events/2037842/videos/20618575">entertaining and enlightening (as usual) keynote</a>. It was also the first time (I think) where he openly talked about his recently found cancer and discussed his legacy and Perl's future as a language and community. Not a lot of people know this, but back in 2009 I lost my father to cancer, so I really related to a lot of the things he said. The talk was extremely passionate and got him a well-deserved standing ovation. Incidentally, Perl is being used throughout the world in cancer research, helping to achieve some great breakthroughs in the fight against it over the past several years now. I truly hope Larry wins this battle, and I'm pretty sure the entire community is supportive and wishing him and his family all the best.<br />
<br />
Tuesday, Stevan Little gave the "Perl: The Detroit of Scripting Languages" keynote, in which he evolved his OPW talk with new experiences and insights on the present of Perl, stuff we love, stuff we hate, and where to go from there.<br />
<br />
Finally, in wednesday Matt S. Trout gave his "Velociraptor of Christmas Future" keynote, also filled with nice insights and perspectives on what the future holds for Perl as a language and as a community, all in mst's unique <strike>shouting</strike>talking style ;-)<br /><br />
<h3>
cPanel Party Night!</h3>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivtZx8jX_ZxflF24Syn5gVeHqPwjwrcprCi37CsAS8MKX2UsqhOK94VToZ15LDgzdThS4hpsUzyX_jfGavkLSWFP0rgnohyijjYjfCcImrvWCR9tJVKsEfNt4Jn71K4P_YT5kZWiywMytT/s1600/TMNT.jpg" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivtZx8jX_ZxflF24Syn5gVeHqPwjwrcprCi37CsAS8MKX2UsqhOK94VToZ15LDgzdThS4hpsUzyX_jfGavkLSWFP0rgnohyijjYjfCcImrvWCR9tJVKsEfNt4Jn71K4P_YT5kZWiywMytT/s1600/TMNT.jpg" width="150" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">pics, or it didn't happen ;)<br />
</td></tr>
</tbody></table>
On the very first day of talks, <a href="http://cpanel.net/">cPanel</a> greeted all attendants with an <i>open bar</i>(!!) party at the <a href="http://recessarcadebar.com/" target="_blank">Recess </a><a href="http://recessarcadebar.com/" target="_blank">Arcade Bar</a> down on 6th street, featuring a very nice band called <a href="http://thespazmatics.net/" target="_blank">The Spazmatics</a> playing some cool covers. I had a great time there and even got to finish TMNT with 4 other guys (hey, it's an Arcade Bar after all!). It really got me back to my childhood. Thanks, cPanel! You guys are awesome!<br />
<br />
Later that evening some of us moved to the pub in front of Recess to chat for a bit - the arcade bar was great, but also pretty loud. This is where I was exposed to the <a href="http://www.infowars.com/" target="_blank">InfoWars</a> magazine for the very first time. I... I... let's move on :-)<br />
<br />
<h3>
Game Night</h3>
Tuesday's talk ended with a great dinner with ribs and tex-mex at a place called <a href="http://www.saltlickbbq.com/" target="_blank">Salt Lick BBQ</a> - yet another fully paid for dinner, courtesy of our amazing sponsors! The conference organizers even got us private buses(!) to drive everybody there. Food was great, with tasty ribs, lots of side dishes and even dessert. In the meantime they also featured a caricature artist drawing everybody brave enough to ask for it.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://pbs.twimg.com/media/BMLHsvzCQAE6gmS.jpg:large" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://pbs.twimg.com/media/BMLHsvzCQAE6gmS.jpg:large" width="320" /></a></div>
<br />
During dinner I engaged in a great discussion with Shawn O'Connor, CTO of <a href="http://perceptyx.com/">Perceptyx</a>, about companies and employee engagement. As a manager myself, it was very reassuring to talk to another peer about the rights and wrongs of steering a company and motivating teams. We also had a great talk about football because, well, Brazil :-)<br />
<br />
Then it was time for Game Night! Some people went outside to enjoy the atmosphere and play Jenga, and wound up creating pretty big towers - and even more spectacular crashes! Others stayed inside for some board and card games, or just to chat. At one point I was even hit in the back by a frisbee, so I guess there was that too :)<br />
<br />
I for one enjoyed a very nice D&D(ish) game by Rik set in the future, who in the end revealed it to be a Star Trek Next Generation spin-off adventure. I'm not a hardcore trekkie but it surprised me that none of us could actually spot his (now obvious) hints and easter eggs throughout the adventure.<br />
<br />
<h3>
Talks, talks everywhere!</h3>
This year I spend most of my time in the "hallway tracks", bouncing from room to room and engaging in great conversations with fellow developers. I also volunteered to help the organizers (brown shirts FTW!) so I hung around the main LBJ desk helping Chris "perigrin" Prather as best as I could.<br />
<br />
That doesn't mean I didn't enjoy a few of the 80+ talks (not to mention lightning talks) spread through the 3 days of the conference. I liked them all very much, but I feel I need to mention at least two of them here: first, Ricardo "rjbs" Signes' talk on the future of Perl 5 ("Postcards from the Edge") was great, debunking a few myths and unveiling a lot of how things are thought through in the core development of P5P and what we can expect from Perl 5 versions in the near future - including long-awaited signatures! Second, Augustina "auggy" Ragwitz' talk on extremely easy ways to contribute to Perl 5 (and dip your toes in Perl 5 development in general) was very well thought of and presented, and I really think it can break some entry barriers and reach developers having their first contact with Perl.<br />
<br />
The Lightning Talks sessions were also very entertaining and fun. It amazes me how people in the US just rush to line up and talk about all the cool stuff they're doing with Perl. In Brazil, at least, most YAPC attendants don't seem attracted to giving lightning talks. Maybe they're too embarrassed, I don't know. Still need to think about ways to change this around here, I just love lightning talks too much :-)<br />
<br />
<h3>
Worldwide Job Fair</h3>
One of the high points of the conference is the job fair, specially if you're looking for new challenges, moving opportunities or simply a larger paycheck. Perl-centric companies from all over the world come to YAPC::NA to promote their business to potential employees and recruit them.<br />
<br />
I'd like to take this moment to thank <a href="http://job.listings.cpanel.net/">cPanel</a>, <a href="https://www.whitehatsec.com/">Whitehat Security</a>, <a href="https://www.liquidweb.com/">LiquidWeb</a>, <a href="http://www.linode.com/">Linode</a>, <a href="http://www.athenahealth.com/careers/">AthenaHealth</a>, <a href="http://www.thegamecrafter.com/">The Game Crafter</a>, <a href="http://www.mediamath.com/">MediaMath</a>, <a href="http://www.shutterstock.com/jobs.mhtml">Shutterstock</a>, <a href="http://bluehost.com/boss">Bluehost.com</a>, <a href="http://booking.com/">Booking.com</a>, <a href="http://www.hostgator.com/jobs/">HostGator</a>, <a href="http://www.qsii.com/">NextGen</a>, <a href="http://globalnoc.iu.edu/">GlobalNOC</a> and everybody else at the job fair (really sorry if I missed your company, just let me know and I'll update this) for being there, not just for the conference, but for Perl developers all over.<br />
<br />
Seriously. These companies built their businesses around Perl and heavily rely on it for striving in the competitive market every single day. You should definitely support them if you can. And if you're looking for a full-time Perl job, please send them your resume.<br />
<br />
<h3>
"You're not my community. You're my family."</h3>
In between the Lightning Talks, while speakers were setting things up, people had the opportunity to make quick (~30s) announcements on whatever it is they felt like it. On the last day, Ribasushi poured his heart out thanking the Perl community for sponsoring his trip to the event via <a href="https://www.crowdtilt.com/">Crowdtilt</a>. It was very touching, specially since I kinda feel the same way.<br />
<br />
<h3>
My Lightning Talk</h3>
For the first time ever, I went to a Perl conference committed to not giving any talks. I failed :) Jim Keenan approached Brian "Hugmeir" Fraser and myself during the pre-conference dinner asking us to follow his fiendish plot of having a Spanish & Portuguese lightning talk at the conference. We were really excited of being able to share a bit of our language and culture with everyone (Hugmeir is from Argentina), specially in a US state so close to Mexico. We were also terrified, thinking there was no way we could pull this off, and that people would just have to settle with a 5 minute "wtf" talk in not one but two different languages. So I figured what the hell, let's make it a comedy act and have the slides in english pretending they're part of the english-only audience and not getting anything we say. Hugmeir was totally up for it and we even got guest stars Genehack and Sawyer to help us flip the slides. As we started talking the crowd quickly turned its initial confusion to giant bursts of laughter. We had a great time and the response has been overwhelming! <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikCL94ml2XLeYjpGWqc4C9riaE8Y5Rn9fzZrPQlo_meWRFUDYwSz63L1pHODJUjzNr5tKcrLQ54Z51rrt89RrdvOmyx9RaUoN0jZhlAjkZ09gx1rJqndPTDrG8LvCbpywtiFnAIXJ0D9b9/s524/Screen+Shot+2013-06-29+at+2.26.14+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikCL94ml2XLeYjpGWqc4C9riaE8Y5Rn9fzZrPQlo_meWRFUDYwSz63L1pHODJUjzNr5tKcrLQ54Z51rrt89RrdvOmyx9RaUoN0jZhlAjkZ09gx1rJqndPTDrG8LvCbpywtiFnAIXJ0D9b9/s400/Screen+Shot+2013-06-29+at+2.26.14+AM.png" width="400" /></a></div>
<br />
We even got featured on the <a href="http://www.shutterstock.com/blog/2013/06/yet-another-perl-conference-the-shutterstock-tech-team-goes-to-austin/">Shutterstock YAPC::NA blog post</a>! This was also pretty big for Hugmeir as it was his very first talk. Thanks everyone!<br />
<br />
<h3>
Bingo \o/</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUclkBtbZ6vtDcSesomj9rA4oWqNEkQxEBRdvNOK0xD7ax5l1S57I81xpvFjbYXIVlgREivvTPQuxT__uvyRkUkziJeAiQkx0LLAXiAEP0ThFri0EUB2AU_-66_T0bI5kV30-IC_TOqFhG/s807/yapc-bingo.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUclkBtbZ6vtDcSesomj9rA4oWqNEkQxEBRdvNOK0xD7ax5l1S57I81xpvFjbYXIVlgREivvTPQuxT__uvyRkUkziJeAiQkx0LLAXiAEP0ThFri0EUB2AU_-66_T0bI5kV30-IC_TOqFhG/s320/yapc-bingo.jpg" width="203" /></a></div>
<br />
The conference itself is filled with small pleasures, and one of them is the YAPC Bingo. Every attendant gets a card filled with stuff to do during the conference. Every time you do one of them, you cross it on the card. This year the only one I missed was the Bad Movie BOF, which I heard was great and fun as usual. This was a very tough choice for me as I really enjoy watching crappy movies. Besides, David Adler is an amazing bad movie connoisseur and a fun guy to hang out with in general, but when so many things are going on, you eventually get caught up in them. Also, since I don't see many of these people throughout the year, I just couldn't bear to let go of the hanging out and chatting.<br />
<br />
Also, Sawyer managed to reach out to first-time attendants, finding tons of seasoned volunteers to help them with whatever Perl help they needed for their projects, provided they showed their YAPC Bingo cards with at least one full row/column/diagonal line completed.<br />
<br />
<br />
That's it! I'm pretty sure I missed a lot of highlights, so make sure to blog about them if you can, or just let people know the stuff you liked in the comments below. A huge THANK YOU is in order to master chief Todd Rinaldo and the great Austin Perl Mongers for organizing such an incredible conference.<br />
<br />
And now I can't wait for YAPC::EU, YAPC::Asia, YAPC::Brazil..... see you out there!garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com8tag:blogger.com,1999:blog-7734799596325955005.post-88515902165031888072013-01-14T06:55:00.001-02:002013-01-14T20:45:46.414-02:00Perl in 2012<span style="font-size: x-small;"><i>I know, I know, I'm two weeks late. Sorry! I scheduled this to go live on January 1st but obviously something went wrong =X</i></span><br />
<br />
<h2>
Happy New Year, Perl folks!</h2>
<br />
2013 is already here, and if it's even half as good as 2012, we're in for quite a treat. So, without further ado, here are the highlights of the Perl world in 2012!<br />
<br />
<h3>
Perl Turns 25!</h3>
<br />
One score and five years ago Larry Wall brought forth on this world a new programming language, conceived in liberty and dedicated to the proposition that there is more than one way to do it.<br />
<br />
To celebrate this amazing ride, Mark Keating wrote an <a href="http://news.perlfoundation.org/2012/12/the-first-twenty-five-years.html" target="_blank">incredible retrospective of the Perl community and its history</a>. It's long - well, it's been 25 years! - but it's definitely worth checking out. This is, in fact, one of the reasons I like Perl so much: it's not just a (pretty damn good) tool to get the job done. It's 25 years of culture; of progress, adaptation, community, friendship, of good days and bad days, exhilaration, frustration, love, hate; of being a part of something that has a life of its own, something that's not blunt or dull, and that attracts brilliant people willing to share the knowledge and make the most amazing things.<br />
<br />
<br />
<h3>
The Map of CPAN</h3>
<br />
<br />
Speaking of "living and breathing", have you seen this movie by Grant McLean?!<br />
<br />
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="279" mozallowfullscreen="mozallowfullscreen" src="http://player.vimeo.com/video/51893508" webkitallowfullscreen="webkitallowfullscreen" width="426"></iframe> <br />
<br />
It comes from <a href="http://mapofcpan.org/">mapofcpan.org</a>, a very cool website made to let you explore all the Perl modules uploaded to CPAN. It also offers some nifty sightseeing tours where you'll see recent uploads, profile updates, leaderboards and loads more, all thanks to the awesome and ever-increasing <a href="https://github.com/CPAN-API/cpan-api/wiki/Beta-API-docs" target="_blank">MetaCPAN API</a>.<br />
<br />
<br />
<h3>
A Brand New Perl Data Language</h3>
<br />
Just because most of the world is now focused on web technologies, it doesn't mean that several other niches have ceased to exist. Quite the contrary, actually. 2012 saw a lot of new developments in science, with NASA's Curiosity rover on Mars, Voyager 1 leaving the Solar System, and CERN observing the Higgs boson.<br />
<br />
Did you know NASA uses Perl as one of its languages? <a href="http://code.nasa.gov/project/simple-scalable-script-based-science-processor-for-measurements/" target="_blank">Some of it is even open source</a>! CERN and many other labs also rely on Perl for processing information and making separate systems talk to each other. But I digress. My point is, if you're doing science with Perl you're probably doing some heavy math. And if you're doing heavy math with Perl you're probably using - or at least have heard of - the <a href="http://pdl.perl.org/" target="_blank">Perl Data Language</a> suite.<br />
<br />
For those of you that don't know, PDL gives standard perl the ability to <i>compactly</i>
store and <i>speedily</i> manipulate the large N-dimensional data sets that are
the bread and butter of scientific computing. In 2012, we saw the release of PDL 2.4.10, a long-awaited version that includes support for automatic multi-thread parallelisation, data structures of over 2GB and POSIX threads. If you want to check it out, they also released the <a href="http://sourceforge.net/projects/pdl/files/PDL/2.4.10/PDL-Book-20120205.pdf/download" target="_blank">first draft of the PDL Book</a> in pdf, which does a great job at complementing the already thorough <a href="http://pdl.perl.org/?page=reference" target="_blank">PDL documentation</a>.<br />
<br />
<br />
<h3>
New Milestones for Perl Quality Assurance</h3>
<br />
This was a great year for the CPAN Testers. Not only the QA Hackathon yielded some awesome results, but <a href="http://blog.cpantesters.org/diary/138" target="_blank">the amount of received tests reached the 20 million mark</a>! In fact, the year closed with over 27 million reports. Keep them coming!<br />
<br />
Another important number was reached by the <a href="http://changes.cpanhq.org/" target="_blank">CPAN::Changes Kwalitee Service</a>, created by Brian Cassidy to promote a <a href="https://metacpan.org/module/CPAN::Changes::Spec" target="_blank">standard format for Perl module's changelog</a> to enable automated parsing and analysis. In September, the service reached 10,000 readable Changes files on CPAN. That's almost 40% of CPAN! It's still a long way to go but this steady increase in compliance goes to show how important the initiative is.<br />
<br />
<br />
<h3>
Startups and Perl</h3>
<br />
<br />
We all know the story of <a href="http://www.salon.com/1998/10/13/feature_269/" target="_blank">how Yahoo! was created with Perl</a>, and how high-traffic websites such as Amazon, Craiglist, IMDb and even the BBC use Perl extensively as part of their core business in mission critical applications and tasks. But it seems these days people are focused on web startups and how to be the next Silicon Valley sweetheart, so it's worth checking out whether modern Perl is still up for the task in a world with so much competition and so many different dynamic languages to chose from in your business.<br />
<br />
I could mention the <a href="https://metacpan.org/" target="_blank">tons of modules on CPAN</a> that do all the heavy lifting for you and let you worry just about the stuff that really matters to your business, delivering your products on time and under budget. I could mention all the conferences and support - free or paid - that you can get (in fact I am, just not now). I could even mention how businesses like <a href="http://booking.com/">Booking.com</a> built their multi-billion empires taking advantage exactly of all these features, using Perl as their main language. But this is a 2012 roundup so, instead, I'm going to share some 2012 enterprise Perl news:<br />
<br />
Do you know <a href="http://moonfruit.com/" target="_blank">Moonfruit</a>, the website and shop builder created by couple Joe and Wendy White? They've been around for some time, but only lately they've made a real push in innovation, creating a brand new site and interface using the <a href="http://www.perldancer.org/" target="_blank">Perl Dancer framework</a>, and focusing on some dazzling pre-built designs for their users to chose from. The reward? In May 2012, <a href="http://techcrunch.com/2012/05/15/moonfruit-finally-exits-for-29-million-in-cash-to-re-energise-yell/" target="_blank">Moonfruit was acquired by Yell for $29 million USD</a>!<br />
<br />
<iframe height="280" src="https://duckduckgo.com/about-video.html" width="498"></iframe>
<br />
<br />
On the other side of the Atlantic, the startup search engine <a href="https://duckduckgo.com/" target="_blank">DuckDuckGo</a> hit yet another milestone in 2012, with <a href="http://searchenginewatch.com/article/2152872/DuckDuckGo-Hits-New-Milestone-1-Million-Searches" target="_blank">over one million direct search queries per day</a>. In a web ruled by search monsters such as Google, Bing, Yahoo!, Ask and AOL, that's pretty impressive, and represents a growth of over 500% for them!<br />
<br />
Speaking of impressive, the Perl-based global image marketplace <a href="http://www.shutterstock.com/" target="_blank">Shutterstock</a> surpassed 20 million images in its collection and completed its initial public offering on the New York Stock Exchange in October. Shutterstock's NYC headquarters revealed the financial results of the third quarter, with a revenue of $42.3 million USD, a 36% increase from last year! And you can see <a href="http://bits.shutterstock.com/?p=63%29." target="_blank">why Shutterstock chose Perl</a> directly from the horse's mouth =)<br />
<br />
Finally, you might have heard of JT Smith's startup, <a href="https://www.thegamecrafter.com/" target="_blank">The Game Crafter</a>. Since 2009, this Perl business created an industry as it became the world’s first web-to-print game publishing company, offering a print on demand game publishing service. In 2012, the company grew by 318%, selling nearly 20,000 board games and almost 400,000 loose game pieces!<br />
<br />
So, what are you waiting for? Who knows, maybe next year I'll be talking about <b>YOUR</b> Perl-based startup company ;-)<br />
<br />
<br />
<h3>
</h3>
<h3>
Conferences & Workshops</h3>
<br />
As previous years, 2012 was filled with Perl events!<br />
<br />
Starting off the season in January was the <a href="http://www.perloasis.info/opw2012/" target="_blank">Orlando Perl Workshop</a> (OPW), also known as The Perl Oasis. This conference holds a very special place in my heart for being <a href="http://onionstand.blogspot.com.br/2012/02/perl-oasis-2012.html" target="_blank">my first ever international Perl event</a>. I definitely recommend you check it out!<br />
<br />
February saw another edition of the <a href="http://act.perl.org.il/ilpw2012/" target="_blank">Israel Perl Workshop</a>, with some very interesting talks. Shlomi Fish was kind enough to write a <a href="http://blogs.perl.org/users/shlomi_fish/2012/03/report-on-the-israeli-perl-workshop-2012.html" target="_blank">very nice review of the event</a> for those of us that couldn't attend.<br />
<br />
In March we had the ever-great <a href="http://conferences.yapceurope.org/gpw2012/" target="_blank">German Perl Workshop</a>, while Paris hosted the <a href="http://2012.qa-hackathon.org/" target="_blank">Perl Quality Assurance Hackathon</a>. I had the <a href="http://onionstand.blogspot.com.br/2012/04/perl-qa-hackathon.html" target="_blank">privilege of participating in the QA Hackathon</a>, helping out in what I think are some of the most important bits of the Perl ecosystem. Hopefully this year I'll be able to attend as well, finish what I started and try and help as much as I can.<br />
<br />
April was the <a href="http://dcbpw.org/dcbpw2012/" target="_blank">DC-Baltimore Perl Workshop</a>, where you could chose between great talks, beginner training courses or a day-long Perl hackathon. Almost at the same time, in Europe, the <a href="http://www.perlworkshop.nl/nlpw2012/" target="_blank">Dutch Perl Workshop</a> also held a very high quality, full day event.<br />
<br />
May held a <a href="http://perlmova.org/yr2012/" target="_blank">joint Perl Mova (Ukranian Perl Workshop) and YAPC::Russia in Kiev</a>. This was special one for them because they had over 200 people registered, several guest speakers and attendees from over 13 countries. Even more so, Kiev was chosen to host YAPC::Europe in 2013! Congratulations!<br />
<br />
In June the worldwide Perl community stood in awe as J.T. Smith presented us with one of the greatest <a href="http://www.yapcna.org/" target="_blank">YAPC::NA</a> of all time! Beautifully organized by himself and the <a href="http://www.madmongers.org/" target="_blank">Mad Mongers</a>, the conference served over 400 attendees from the entire World with an incredible infrastructure, a full week of <a href="http://www.youtube.com/yapcna" target="_blank">modern Perl talks</a>, training courses and hackathons (including a ginormous hardware hackathon courtesy of Robert Blackwell), plus the job fair, game night, bad movie night... Wow. Just... wow.<br />
<br />
After the YAPC, many Perl developers traveled to DuckDuckGo's HQ in Philadelphia for the <a href="http://act.yapc.eu/qh2012/" target="_blank">2012 Quack and Hack</a> event, where the company held Perl talks and hackathons for their <a href="http://duckduckhack.com/" target="_blank">public API</a>.<br />
<br />
Later that month we also had the <a href="http://journeesperl.fr/fpw2012/" target="_blank">French Perl Workshop</a>, a 2-day conference that's attracting more and more people each year, proving once again that the French Perl community is one of the most actives in Europe. <i>Allons-y</i>!<br />
<br />
As usual, July is OSCON time, and once again we had <a href="http://www.oscon.com/oscon2012/public/schedule/topic/818" target="_blank">lots of great talks on the Perl track</a>.<br />
<br />
In August we had the always impressive, week-long <a href="http://act.yapc.eu/ye2012/" target="_blank">YAPC::Europe</a>, this time in Germany. Sadly I couldn't make it but I heard it was <b>*HOT*</b>, in both senses of the word ;-) Just before that, the brilliant duo Liz & Wendy<span title=""> </span>organized the <a href="http://blogs.perl.org/users/liz/2012/08/as-some-of-you-may.html" target="_blank">Perl Reunification Summit</a>, in the city of Perl, where a lot of very important issues were discussed regarding the future of the Perl community as a whole. Finally, in late August, the Oslo Perl Mongers invited everyone to their <a href="http://act.yapc.eu/mtmh2012/" target="_blank">Moving to Moose Hackathon</a>, in Norway, where attendees got 4 full days of hacking, discussions and fun!<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDWTISDjjuh42LkXV6kBqvO_v7qI3RUlxLaO_zXVkoOBn5-Cs8yrRa29pULFJN0OL2ABcSrVUjutaYRD0dNEJjPff2UDKC2oR_UUcHupZmEAaCdKYaSpl1He1K2Ls5k9Xo1pLAkZ46cqk4/s1600/Over_9000_Vector_by_Vernacular.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDWTISDjjuh42LkXV6kBqvO_v7qI3RUlxLaO_zXVkoOBn5-Cs8yrRa29pULFJN0OL2ABcSrVUjutaYRD0dNEJjPff2UDKC2oR_UUcHupZmEAaCdKYaSpl1He1K2Ls5k9Xo1pLAkZ46cqk4/s200/Over_9000_Vector_by_Vernacular.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">it's over eight hundred!!!!!!</td></tr>
</tbody></table>
<br />
September was the month of <a href="http://yapcasia.org/2012/" target="_blank">YAPC::Asia</a>, the biggest Perl conference in the world, and in 2012 they broke their own record: <i>over 800 people attending</i>!<br />
<br />
Once again, the incredible Daisuke Maki, his partner in crime Kushii-san and the entire staff of 43(!) volunteers pulled off an amazing conference. Maki-san, as usual, posted a <a href="http://blogs.perl.org/users/lestrrat/2012/10/a-glimpse-of-yapcasia-tokyo-2012.html" target="_blank">very nice roundup of YAPC::Asia 2012 in his blog</a>, so make sure to check it out!<br />
<br />
<br />
Still in September, the traditional <a href="http://workshop.perl.pt/ptpw2012/" target="_blank">Portuguese Perl Workshop</a> was held in Braga and included a Moose tutorial and several very interesting talks.<br />
<br />
October was a month filled with Perl. We had the <a href="http://act.yapc.eu/ipw2012/" target="_blank">Italian Perl Workshop</a>, the <a href="http://act.yapc.eu/npw2012/" target="_blank">Nordic Perl Workshop</a>, the <a href="http://event.perl.kr/kpw2012/" target="_blank">Korean Perl Workshop</a>, and <a href="http://yapcbrasil.org.br/2012/" target="_blank">YAPC::Brasil</a>. So many conferences, so little time! I, of course, was in São Paulo for the YAPC::Brasil, and not only saw some great talks and participated on the OpenData hackathon, I also saw history being made: Florian Ragwitz released Perl 5.17.5 <i>live on stage</i>! This was not only the <b>first ever live Perl release</b>, but also the <b>first release in South America</b>! Many thanks to Florian and the entire Perl Core Team for letting this happen \o/<br />
<br />
In November we had the <a href="http://2012.useperl.at/apw2012/" target="_blank">Austrian Perl Workshop</a> and the always amazing <a href="http://act.yapc.eu/lpw2012/" target="_blank">London Perl Workshop</a>, UK's free and premier Perl event, holding over 200 people each year!<br />
<br />
Finally, closing the calendar, DuckDuckGo's <a href="http://act.yapc.eu/qh2012eu/" target="_blank">Quack and Hack Europe</a> introduced several people to some modern Perl basics in beautiful Paris, while on December 22nd St. Petersburg held the <a href="http://event.yapcrussia.org/saintperl4/index.html" target="_blank">Saint Perl</a> conference with over 40 people.<br />
<br />
<br />
<h3>
In the Year of the Olympics, a new World Record</h3>
<br />
<br />
Back in January 2012 I made the terrible mistake of letting rafl know about my evil plan of getting the World Record for most YAPCs attended on a single year. I wanted to cover all the 5 current YAPCs - NA, Russia, EU, Asia and Brasil - but I had just switched jobs and was unable to do it this time.<br />
<br />
He did.<br />
<br />
<i>rafl> really, there's no way I'm letting you win this whole most YAPCs a year thing ;)</i><br />
<br />
So there you have it. Florian Ragwitz holds the World Record in most YAPCs attended in a single year. I love this crazy bastard, and I can attest that, as legend is told, <a href="https://metacpan.org/module/Acme::rafl::Everywhere" target="_blank">he is pretty much everywhere</a> :)<br />
<br />
<span style="font-size: x-small;">(ssshh! By the way, if you want to steal his record (I'm sure gonna try!), I heard there's a new YAPC coming up from <i>down under</i>!)</span><br />
<br />
<br />
<h3>
White Camel Awards</h3>
<br />
The White Camel Awards of 2012 went to Renée Bäcker, Jim Keenan and... myself! Wow, I don't even know what to say except a very big <i>"Thank You"</i> to everyone. Not just a huge honor to me, I feel this award was particularly important as it was the very first White Camel given to someone from Latin America, and hopefully it will help reduce even more the barriers between Perl communities worldwide, showing people that there are some nice things going on on this side of the equator too :D<br />
<br />
I would also like to take this opportunity to congratulate both Jim and Renée for the astounding work they've been doing over the years. Very well deserved recognition, guys!<br />
<br />
<br />
<h3>
Free/Low Cost Perl Training</h3>
<br />
This year Dave Cross started his <a href="http://perlschool.co.uk/" target="_blank">Perl School</a> project, bringing low cost and high quality public Perl training into the UK. In 2012 he managed to give three training sessions, two "Modern Perl for Non-Perl Programmers" and one "Object Oriented Programming With Perl and Moose". Cool!<br />
<br />
The Miyagi University in Japan also started a series of <a href="http://sendai.pm.org/myu2012/" target="_blank">free special courses</a> that featured several outstanding Perl Mongers like Goto Eikichi (egopro), Daisuke Murase (typester), Yusuke Wada (yusukebe) and Dan Kogai (dankogai). I think they ran into some trouble due to earthquakes (my japanese is not very good), but it was still a great initiative and I'm eager to know how that went.<br />
<br />
And if you're into online training, you should definitely check out vti's <a href="http://perltuts.com/" target="_blank">Perl Tuts</a>, a website where you can learn modern Perl 5 through several tutorials and, best of all, try your code online!<br />
<br />
brian d foy also started a series of <a href="http://www.learning-perl.com/?cat=42" target="_blank">Learning Perl Challenges</a>, a very nice resource for beginners wanting to test (and improve) their skills.<br />
<br />
Finally, Gabor Szabo started the <a href="http://perl5maven.com/" target="_blank">Perl 5 Maven</a> website, in which he pushes several articles and tutorials of different shapes and sizes, aimed to improve your Perl expertise. Also, in April, his <a href="http://perlweekly.com/" target="_blank">Perl Weekly newsletter</a> hit 3,000 subscribers, wow!<br />
<br />
<br />
<br />
<h3>
2012 Stats</h3>
<br />
Perl 5 tickets <i>opened</i>: <b>853</b><br />
Perl 5 tickets <i>resolved</i>: <b>1036</b><br />
<br />
Perl 6 tickets <i>opened</i>: <b>433</b><br />
Perl 6 tickets <i>resolved</i>: <b>473</b><br />
<br />
Sweet! We've finished the year with a very nice positive margin :)<br />
<br />
Between stable and development, Perl 5 saw 21(!) new releases, including the new 5.16, with Unicode 6.1 support, several performance enhancements and <a href="https://metacpan.org/module/RJBS/perl-5.16.0/pod/perldelta.pod" target="_blank">much more</a>.<br />
<br />
Meanwhile, the <a href="http://rakudo.org/" target="_blank">Rakudo Perl 6</a> team kept the promise of 1 new "Rakudo Star" release each month (except for the March release but <a href="http://rakudo.org/2012/04/05/no-rakudo-star-release-for-march-2012-stay-tuned-for-april/" target="_blank">they had a good reason</a>), and now the project has an MSI Installer for Windows! You can download the December release <a href="http://rakudo.org/downloads/star/rakudo-star-2012.12.tar.gz" target="_blank">here</a> (or <a href="http://rakudo.org/downloads/star/rakudo-star-2012.12.msi" target="_blank">here</a>, for the MSI). As you can see on their feature comparison page, almost everything in the spec is already working. Congratulations!<br />
<a href="http://www.perlfoundation.org/" target="_blank"><br /></a>
<a href="http://www.perlfoundation.org/" target="_blank">The Perl Foundation</a> also released their <a href="http://news.perlfoundation.org/2013/01/2012-year-end-report.html" target="_blank">2012 Year End Report</a>, and what a great year it was!<br />
<br />
Speaking of stats, you should also check the summaries for the <a href="http://niceperl.blogspot.co.il/2013/01/20-best-perl-questions-at-stackoverflow.html" target="_blank">20 best Perl questions of 2012 at Stack Overflow</a>, and the <a href="http://niceperl.blogspot.co.il/2013/01/blog-post.html" target="_blank">2012 most voted distributions on MetaCPAN</a>, both courtesy of Miguel Prz. Note that Miguel has been doing weekly summary posts about this, so if you want to keep track of that make sure to subscribe to his feed!<br />
<br />
<br />
<h3>
New Perl Monger Groups</h3>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY1sVJopYX4DP5b1y7wpIjiG2dfa90M_A-SRscu1QeP0zdvGWOyQCx-4a4GbL_8DzmwzdQKHLvPMMXjBVCe-9-EIOp7tSArRGci4g4wJSGKS8J2QAR5xjc4_sw7sKcBTStMH29I20LKmfg/s1600/cluj.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="127" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY1sVJopYX4DP5b1y7wpIjiG2dfa90M_A-SRscu1QeP0zdvGWOyQCx-4a4GbL_8DzmwzdQKHLvPMMXjBVCe-9-EIOp7tSArRGci4g4wJSGKS8J2QAR5xjc4_sw7sKcBTStMH29I20LKmfg/s200/cluj.png" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cluj Perl Mongers' cool "dracula" logo</td></tr>
</tbody></table>
<br />
In 2012 the worldwide Perl community welcomed <b>8</b> new Perl Monger groups: <a href="http://mumbai.pm.org/" target="_blank">Mumbai</a>, <a href="http://weston.pm.org/" target="_blank">Weston</a>, <a href="http://cluj.pm.org/" target="_blank">Cluj</a>, <a href="http://niigata.pm.org/" target="_blank">Niigata</a>, <a href="http://baku.pm.org/" target="_blank">Baku</a>, <a href="http://shijiazhuang.pm.org/" target="_blank">Shijiazhuang</a>, <a href="http://whiteplains.pm.org/" target="_blank">White Plains</a> and <a href="http://duesseldorf.pm.org/" target="_blank">Duesseldorf</a>, not to mention Robert Blackwell's <a href="http://hardware.pm.org/" target="_blank">Hardware Perl Mongers</a>, for all of us who enjoy using Perl to play with Arduino, Rasberry Pi and other devices.<br />
<br />
We also saw a huge facelift in the <a href="http://www.pm.org/" target="_blank">Perl Mongers</a> website. Much better now! <a href="https://github.com/perlorg/www.pm.org/" target="_blank">Code's on github</a> if you want to contribute. I heard patches are very welcome :)<br />
<br />
Finally, still in the topic, Vyacheslav Matyukhin made a Perl
Community Motivation survey, and a lot of people submitted their input
as to what drives them. <a href="http://berekuk.github.com/perl-motivation-survey/" target="_blank">Results are in</a>, and worth a peek.<br />
<br />
<br />
<h3>
Got Book? </h3>
<br />
<br />
Back in February we saw the <i>Camel Book</i>, "<a href="http://shop.oreilly.com/product/9780596004927.do" target="_blank">Programming Perl</a>", go into its 4th edition. This is a much-anticipated update to what's considered by many as <i>the</i> bible for Perl 5 and a must read for everyone, and I'm really glad to see it fully cover 5.14!<br />
<br />
Later in 2012 the very cool "<a href="http://shop.oreilly.com/product/0636920012689.do" target="_blank">Intermediate Perl</a>" by Randal Schwartz, brian d foy and Tom Phoenix also got an update with its second edition! I had the privilege and the honor of being part of the reviewing team for this one, and I was very impressed at how much got updated. If you liked "<a href="http://shop.oreilly.com/product/0636920018452.do" target="_blank">Learning Perl</a>", you're gonna love "Intermediate Perl".<br />
<br />
Curtis "Ovid" Poe made his book author debut this year, with his "Beginning Perl", a modern introduction to Perl programming that even includes material for instructors. You can browse some of its contents <a href="http://ofps.oreilly.com/titles/9781118013847/" target="_blank">here</a> but, if you like it, I highly recommend you <a href="http://www.wrox.com/WileyCDA/WroxTitle/productCd-1118013840,descCd-buy.html" target="_blank">get a copy</a>.<br />
<br />
Speaking of modern, chromatic's "<a href="http://www.onyxneon.com/books/modern_perl/index.html" target="_blank">Modern Perl</a>" book was updated in January and is available in several different formats, including some free ones (like EPUB)!<br />
<br />
Last but not least, Miyagawa's Plack Handbook was released in <a href="http://www.amazon.co.jp/Plack-Handbook-ebook/dp/B009Z30LRA/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1358149010&sr=1-1" target="_blank">Japanese</a> and <a href="http://www.amazon.com/Plack-Handbook-ebook/dp/B009ZKN98Q/ref=sr_1_1?ie=UTF8&qid=1358149116&sr=8-1&keywords=plack+handbook" target="_blank">English</a>, containing 24 useful short articles that explain what PSGI is all about and how to adapt Plack to existing web applications. And guess what? For a few days it was ranked #4 on Kindle Japan on the Computer/IT category. Omedetou!<br />
<br />
<br />
<h3>
Interesting New Dists</h3>
<br />
<br />
This is in no way comprehensive, but I also wanted to share some interesting new distributions that reached CPAN in 2012. Check them out!<br />
<br />
<ul>
<li><a href="https://metacpan.org/module/archlib" target="_blank">archlib</a>, by Chad Granum is a proof-of-concept that lets you add tar archives to @INC.</li>
<li>Damian Conway's new <a href="https://metacpan.org/module/Regexp::Debugger" target="_blank">Regex::Debugger</a> makes debugging regular expressions much easier and even includes a command-line REPL called <i>rxrx</i> to visually and interactively check your regexes.</li>
<li>Tokuhiro Matsuno's <a href="https://metacpan.org/module/Test::Pretty" target="_blank">Test::Pretty</a> (ab)uses colors and unicode characters to make your test output beautiful and much more readable!</li>
<li><a href="https://metacpan.org/module/sqitch" target="_blank">sqitch</a>, by David Wheeler, is a self-entitled sane, standalone database change management application written in Perl that supports native scripting, dependency resolution and iterative development.</li>
<li>Ever wanted a modern web-based Perl editor? Try <a href="https://metacpan.org/module/Farabi" target="_blank">Farabi</a>, an experimental "fork" of Padre made by Ahmad Zawawi and making heavy use of JavaScript.</li>
<li>Although not a new dist but also very noteworthy, Plack, the module that revolutionized Perl web frameworks, has hit 1.0! After seeing so many companies adopting it for production, Miyagawa-san decided it was time to formalize it as stable. He also set a core team to make it even easier to support and further develop. This is very good news, and you can check out the full announcement <a href="http://weblog.bulknews.net/post/27599596262/plack-1-0-and-the-future" target="_blank">here</a>.</li>
</ul>
<br />
How about you? Discovered some cool module this year?<br />
<br />
<br />
<h3>
Donations</h3>
<br />
Early in 2012, <a href="http://news.perlfoundation.org/2012/01/craigslist-charitable-fund-don.html" target="_blank">Craiglist donated $100,000.00 to the Perl Foundation</a>. According to their <span class="caps">CEO </span>and former Perl
Hacker Jim Buckmaster, "craigslist has gloried in and relied upon Perl
for most of its software development for more than a decade. craigslist
Charitable Fund is honored to recognize the wizardry and generosity of
the Perl community, help ensure the ongoing maintenance of Perl5, and
contribute to the future evolution of Perl."<br />
<br />
Many many many <i><b>*many*</b></i> thanks to <a href="http://craiglist.org/" target="_blank">Craiglist</a>, and to all the companies and individuals that continuously help the language and its community. <br />
<br />
And if you want to donate as well, both <a href="https://secure.donor.com/pf012/give" target="_blank">The Perl Foundation</a> and the <a href="http://www.enlightenedperl.org/donations.html" target="_blank">Enlightened Perl Organization</a> will definitely appreciate it, and even let you chose specific destinations to your money (like a particular conference or to the CPAN Testers). Every penny counts!<br />
<br />
<br />
<h3>
Wrapping Up</h3>
<br />
<br />
Well, that's it for 2012. Sorry for the long blog post but, as you can see, it's been a really great year for Perl ;-)<br />
<br />
Let me know if I missed anything, ok? And keep on making great things with modern Perl!<br />
<br />garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com6tag:blogger.com,1999:blog-7734799596325955005.post-28066503870914395892012-12-05T02:22:00.000-02:002012-12-05T02:44:40.023-02:00Are you relying on hash keys being ordered?<i>tl;dr</i><b> </b>- if you rely on Perl 5, and plan to eventually upgrade to the upcoming 5.18, do this <b>*now*</b>:<br />
<br />
<ol>
<li>Install 5.17.6 (you do use <a href="http://perlbrew.pl/" target="_blank">perlbrew</a>, right?);</li>
<li>Try your modules and apps in it (you do have tests, right?);</li>
<li>If anything breaks, it's likely because you're relying on keys(), values() or each() being in some particular order. You really shouldn't, so go sort() your keys or something :)</li>
<li> If some CPAN module you depend on suddenly fails on 5.17.6, make sure to let the author know; </li>
<li> Spread the word!</li>
</ol>
<br />
<h3>
On Hashes & Security</h3>
<br />
The Perl 5 core team has always put security as one of its top priorities. To put things under perspective, in late 2011, an algorithmic complexity remote denial of service attack (<a href="http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf" target="_blank">original paper</a>, <a href="http://www.nruns.com/_downloads/advisory28122011.pdf" target="_blank">advisory</a>, <a href="http://events.ccc.de/congress/2011/Fahrplan/attachments/2007_28C3_Effective_DoS_on_web_application_platforms.pdf" target="_blank">slides</a>, <a href="http://media.ccc.de/browse/congress/2011/28c3-4680-en-effective_dos_attacks_against_web_application_platforms.html" target="_blank">video</a>) was found on major language implementations like PHP, Ruby, Python, Java, even JavaScript. It's been fixed in Perl 5 since... 2003.<br />
<br />
<h3>
That was then. What about now?</h3>
<br />
Still thinking about security, Yves Orton pushed some important changes these past few weeks, changes that are going into perl 5.18.0. Among other things, to quote <a href="http://perl5.git.perl.org/perl.git/commit/7dc8663964c66a698d31bbdc8e8abed69bddeec3" target="_blank">7dc8663964</a>, it: <br />
<br />
<ul>
<li>Introduces multiple new hash functions to choose from at build time. This includes <a href="http://code.google.com/p/smhasher/wiki/MurmurHash3" target="_blank">Murmur-32</a>, <a href="http://www.cse.yorku.ca/~oz/hash.html" target="_blank">SDBM</a>, <a href="http://www.cse.yorku.ca/~oz/hash.html" target="_blank">DJB2</a>, <a href="https://www.131002.net/siphash/" target="_blank">SipHash</a>, <a href="http://www.azillionmonkeys.com/qed/hash.html" target="_blank">SuperFast</a>, and an improved version of the original One-at-a-time.</li>
<li>Rips out the old HvREHASH mechanism and replaces it with a per-process random hash seed.</li>
</ul>
<br />
Optimizations aside, the ability to change hash functions easily is important because, if, for whatever reason, the active function is found vulnerable to an attack, you don't have to wait until the Perl Core Team (or your specific vendor/system) releases a fix: just recompile your perl setting another hash function as default.<br />
<br />
The important bit, however, is the per-process random hash seed. Until now, perl was using a not-so-great hash seed, one that was set during compilation. All hashes would use this seed, and if a collision attack was detected it would trigger a rehash, where every item in the hash would have its hash value recalculated, with corresponding effects performance and memory. Of course, when too many collisions were found, the rehash would switch to a random seed instead.<br />
<br />
Now, after this change, <i>every process is guaranteed to use a random seed</i>.<br />
<br />
Hash randomization should make perl even more robust to complexity attacks, and with simpler code. But, as you may have predicted, there's a side effect to it: the order of hash keys changes more often than before.<br />
<br />
<h3>
Sweet! But, what does it mean to my code?</h3>
<br />
As it is stated in <a href="http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks" target="_blank">perlsec</a> since version 5.8.1 (that one from 2003), <i>Perl has never guaranteed any ordering of the hash keys</i>,
and in fact the ordering has already changed several times throughout
its history. The problem, however, is that a lot of developers end up
inadvertently relying on hashes being ordered, or rather in some random but constant order, simply because that
particular order worked on their machine. Talk about a subtle bug!<br />
<br />
This may not be your case, but you should check nonetheless. Andreas König, Father Chrysostomos and the rest of the P5P/CPANTesters gang have gone through the enormous effort of <a href="https://rt.perl.org/rt3/Public/Bug/Display.html?id=115908" target="_blank">testing several major CPAN distributions for this</a> and letting authors know whenever it failed a test while running on a patched version of perl, but they can only do so much, and there's <b>*your*</b> code to test, too.<br />
<br />
You know, code your app runs, code that you haven't checked to CPAN.<br />
<br />
Oddly enough, it looks like most of the found issues are on test cases themselves, tests that expect keys() to be in a particular order. Now, <a href="http://perldoc.perl.org/functions/keys.html" target="_blank">keys() is guaranteed only to return items in the same order as values() or each()</a>, and even that is only true for the same process, so make sure you're not shooting yourself on the foot.<br />
<br />
<h3>
LIES! My code is perfect, you're the ones that broke Perl!</h3>
<br />
Well, not really. Like I said, it's a subtle bug, one that <i>might be hitting your production code right now</i>, but only on some very specific scenarios, and be very hard to reproduce and debug. If you don't trust me, there's a very simple experiment you can run on your system perl:<br />
<br />
First, let's create a simple one liner that creates 15 key/value pairs, and print them on the screen:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> 6, 11, 3, 7, 9, 12, 2, 15, 14, 8, 1, 4, 13, 10, 5</span></span><br />
<br />
You may have gotten a different order (did you?), but you'll probably get that same order no matter how many times you run it:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> 6, 11, 3, 7, 9, 12, 2, 15, 14, 8, 1, 4, 13, 10, 5</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> 6, 11, 3, 7, 9, 12, 2, 15, 14, 8, 1, 4, 13, 10, 5</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> 6, 11, 3, 7, 9, 12, 2, 15, 14, 8, 1, 4, 13, 10, 5</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> 6, 11, 3, 7, 9, 12, 2, 15, 14, 8, 1, 4, 13, 10, 5</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> > ...</span></span><br />
<br />
What happens, however, if your code adds a 16th key and then, realizing its mistake, removes it right afterwards (highlighted code below)? There are still 15 keys, the very same 15 keys as before, so surely they'll be in the same order, right? Right? Wrong:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> > perl -E 'local $,=q[, ]; $hash{$_}=$_ for 1..15;</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> <span style="background-color: #f4cccc;">$hash{16}=16;<span style="font-size: x-small;"> </span>delete $hash{16};</span> say keys %hash'<br /> 11, 7, 2, 1, 13, 6, 3, 9, 12, 14, 15, 8, 4, 10, 5</span></span><br />
<br />
This can happen anywhere, like when reusing a hash variable:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <b>sub</b> init <b>{</b> ( 1=>1, 2=>2, 3=>3, 4=>4, 5=>5 ) <b>}</b><br /><br /> <b>my</b> %hash <b>=</b> init();<br /> <b>say</b> <b>"</b>original: <b>"</b> <b>.</b> <b>join</b> ', ' => <b>keys</b> %hash<b>;</b><br /> $hash{$_} <b>=</b> $_ <b>for</b> 6..100;<br /><br /> %hash <b>=</b> init()<b>;</b> <i># restores original values</i><br /> <b>say</b> <b>"</b>original? <b>"</b> <b>.</b> <b>join</b> ', ' => <b>keys</b> %hash<b>;</b></span></span><br />
<br />
This is what I get on my good old 5.14.3:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> original: 4, 1, 3, 2, 5<br /> original? 2, 1, 3, 4, 5</span></span><br />
<br />
As you can see, it's a real problem and it could be lurking in your code right now. What Yves' patch does is simply expose the issue more explicitly to you. This is a good thing, because, aside from the extra security protection, it will let you spot buggy code much easier. If you try that previous one-liner on 5.17.6, you'll get a different key order every time you run it:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'<br /> 1, 5, 15, 12, 6, 4, 10, 9, 3, 13, 7, 14, 11, 2, 8<br /> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'<br /> 5, 11, 7, 3, 15, 6, 12, 2, 13, 9, 8, 14, 10, 1, 4<br /> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'<br /> 2, 15, 14, 13, 5, 1, 9, 10, 3, 11, 6, 8, 12, 4, 7<br /> > perl -E 'local $,=q[, ]; $hash{$_} = $_ for 1..15; say keys %hash'<br /> 8, 2, 14, 10, 1, 9, 4, 3, 6, 15, 5, 13, 7, 12, 11</span></span><br />
<br />
<h3>
Uh-oh... looks like my code is broken.</h3>
<br />
Not to worry, the fix is usually pretty easy! Look for the failing test and see if whatever is being tested calls keys(), values() or each() at some point. You'll likely want to sort() the results or change your code algorithm to something more deterministic.<br />
<br />
<h3>
I don't really have that many tests... What can I do?</h3>
<br />
Look for calls to keys(), values() or each() in your code, and make sure they are not relying on the order of the elements being returned. It is ok to do something like:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> my @keys = keys %hash;</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> my @values = values %hash;</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> say "hash key $keys[3] is $values[3]";</span><br />
<br />
because, as I said before, keys() and values() will always use the same order for the same process, whatever that order is. However, this is not ok:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> if ($keys[0] eq 'some_key') {</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> ...</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> }</span><br />
<br />
simply because there's no way to guarantee the order of the list returned by keys(). The code above might have worked, however, if you always sorted the returned value, like so:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> my @keys = sort keys %hash;</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><span style="font-size: small;"><span style="font-family: inherit;"> </span></span> </span><br />
<h3>
Indirect usage</h3>
<br />
Sadly, your code is not safe just because you don't use those functions (or have them properly sorted). Sometimes you expect lists of values from external modules, and those lists might be affected by the change. So make sure you look for arrays that are populated by external functions and see if you rely on their order being a particular one. For example, you might have code like:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> my ($name, $age, $rate) = Some::Module->new->get_list( 'some_user' );</span></span><br />
<br />
And, within Some::Module, you'll find the suspect:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> sub get_list {</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> my ($self, $username) = @_;</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> return values $self->{data}{$username};</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> }</span></span><br />
<br />
Make a failing test for it, push a fix, rinse and repeat :)<br />
<br />
<h3>
I hate this! Switch it back!</h3>
<br />
This is hardly going to happen. Remember: hash randomization is a <i>good</i> thing! Please take another look at the sections above and try to fix your code. If you need help, ask for it at the usual places, like <a href="http://www.pm.org/" target="_blank">your local mailing list</a> or IRC - heck, even <a href="http://www.facebook.com/groups/100858186649890/" target="_blank">Facebook has a Perl group</a>!<br />
<br />
But if you really really really need the previous behavior, you can simply stick to 5.16, or try compiling perl defining PERL_HASH_FUNC_ONE_AT_A_TIME_OLD to simulate the old algorithm, but the entire rehashing mechanism is gone, so specifying your own PERL_HASH_SEED value is probably as close as you'll get :)<br />
<br />
Many thanks to the nice folks at P5P for their continuous effort in keeping us safe!garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com4tag:blogger.com,1999:blog-7734799596325955005.post-43360287273792740192012-05-30T12:35:00.000-03:002012-05-30T12:35:27.632-03:00Moving modules across perlbrew installationsThis short post was triggered by a conversation I had on Twitter with a friend:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHHA-mOuMSXMVG54E_ZMduKzmBM4p6BMpvEDsAdxB8ab2tbTFLUw4am1VL-WG_VsL48e0RNZSG7yj1R-wM_klK2oHAAFIJiCzy9O0jrWei7z3jFWfU4r45_AwmE_X9jzNr6hws1aHAv2Ps/s1600/Screen+Shot+2012-05-30+at+11.35.20+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHHA-mOuMSXMVG54E_ZMduKzmBM4p6BMpvEDsAdxB8ab2tbTFLUw4am1VL-WG_VsL48e0RNZSG7yj1R-wM_klK2oHAAFIJiCzy9O0jrWei7z3jFWfU4r45_AwmE_X9jzNr6hws1aHAv2Ps/s1600/Screen+Shot+2012-05-30+at+11.35.20+AM.png" /></a></div>
<br />
He does strike a nerve there. Ever since Gugod's amazing <a href="http://perlbrew.pl/">perlbrew</a> came to life, installing your custom perl - or several perls for that matter - is <b>*really*</b> easy. However, a new problem surfaced: updating your installation so your applications work again. This is, of course, per design. After all, perlbrew is supposed to give you completely separate installations, and this includes installed modules.<br />
<br />
So, what can you do? Copying your lib directory is out of the question if you have any module that does XS, and chances are you probably do. I'm also not sure if an external local::lib directory would play nice either.<br />
<br />
Luckily, there's a quick-and-dirty recipe to migrate your installed modules from one perlbrew installation to another. Say I just upgraded from 5.14.2 to 5.16.0 and want to install the same modules I had before:<br />
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<span style="font-size: x-small;"><br /></span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: x-small;"> $ perlbrew switch 5.14.2</span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: x-small;"> $ perl -MExtUtils::Installed -E 'say for ExtUtils::Installed->new->modules' > /tmp/installed.list</span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: x-small;"> $ perlbrew switch perl-5.16.0</span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: x-small;"> $ perlbrew install-cpanm </span></div>
<div style="font-family: "Trebuchet MS",sans-serif;">
<span style="font-size: x-small;"> $ cat /tmp/installed.list | cpanm --interactive</span></div>
<br />
Done!<br />
<br />
What I did there was use the core module ExtUtils::Installed to create a list of installed modules in the file "/tmp/installed.list", then feed that list to cpanm. I used "--interactive" because some modules I have (like SDL) ask a few questions during installation, but whatever rocks your boat.<br />
<br />
Also worth noticing that depending on the amount of modules you have installed, that last step can take quite a while, so go watch a movie, read a book or something :)<br />
<br />
I think this tip is particularly pertinent if you're trying out a Release Candidate (RC) for a future perl release and want to make sure your toolchain builds properly - which is always a good idea.<br />
<br />
I'm going to bug gugod for a bit to see if we can come up with something bundled into perlbrew to make this even easier, but for now you can use this :)<br />
<br />
Hope it helps! Happy Perl Brewing!<br />
<br />garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com8tag:blogger.com,1999:blog-7734799596325955005.post-9710121189775615312012-04-09T22:25:00.000-03:002012-04-09T22:32:32.874-03:00Perl QA HackathonLast weekend I was in Paris for the <a href="http://2012.qa-hackathon.org/">Perl QA Hackathon</a>, a free of charge coding workshop for people involved in Quality Assurance, testing, packaging, CPAN, and other related projects.<br />
<br />
I had the best time, met a lot of old friends and made several new ones as well. And we got so much done! It's amazing the amount of work you can do just by sitting next to fellow hackers with the same goals. Coding, debugging, design, feature requests, decision-making, if you had questions or needed help or feedback, all you had to do was look around the room and find the authors/maintainers for a quick tête-à-tête.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://farm7.staticflickr.com/6238/7030025365_48fc3b3397_n.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://farm7.staticflickr.com/6238/7030025365_48fc3b3397_n.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Schwern and Apeiron looking at some code</td></tr>
</tbody></table>
The hackathon was responsible for over 1 thousand man-hours of work on the Perl toolchain ecosystem in just 3 days, and none of that would be possible without all the great <a href="http://2012.qa-hackathon.org/qa2012/sponsors.html">companies and organizations</a> supporting the event: <a href="http://www.cite-sciences.fr/fr/cite-des-sciences/">The City of Science and Industry</a>, <a href="http://www.diabolocom.com/">Diabolo.com</a>, <a href="http://www.dijkmat.nl/">Dijkmat</a>, <a href="http://duckduckgo.com/">DuckDuckGo</a>, <a href="http://dyn.com/">Dyn</a>, <a href="http://freeside.biz/freeside/">Freeside Internet Services</a>, <a href="http://www.hederatech.com/">Hedera Technology</a>, <a href="http://www.jaguar-network.com/">Jaguar Network</a>, <a href="http://www.mongueurs.net/">Mongueurs de Perl</a>, <a href="http://shadow.cat/">Shadowcat Systems Limited</a>, <a href="http://www.splio.com/">SPLIO</a>, <a href="http://www.teclib.com/en">TECLIB’</a>, <a href="http://weborama.com/2/">Weborama</a>, and <a href="http://www.perl-magazin.de/">$foo Magazine</a>. There were also a lot of amazing people who made donations themselves, like Martin Evans, <a href="http://mdk.me/">Mark Keating</a>,
Prakash Kailasa, Neil Bowers, 加藤 敦 (Ktat), Karen Pauley, Chad Davis,
Franck Cuny, 近藤嘉雪, Tomohiro Hosaka, Syohei Yoshida, 牧 大輔 (lestrrat), and
Laurent Boivin. Thank you!<br />
<br />
Many thanks are also in order to Laurent Boivin (elbeho), Philippe Bruhat (BooK) and the Mongueurs de Perl, who did an incredible job organizing the event and hosting/feeding us. Merci beaucoup! :-)<br />
<br />
You probably <a href="http://blogs.perl.org/users/olaf_alders/2012/04/metacpan-at-the-qa-hackathon.html">already</a> <a href="http://barbie.missbarbell.co.uk/diary/286">read</a> <a href="http://barbie.missbarbell.co.uk/diary/287">about</a> <a href="http://www.dagolden.com/index.php/1660/perl-qa-hackathon-wrapup/">some</a> <a href="http://rjbs.manxome.org/rubric/entry/1948">of</a> <a href="http://weblog.bulknews.net/?30879c00">the</a> <a href="http://blogs.perl.org/users/paul_johnson/2012/03/vim-report-for-develcover-perl-qa-hackathon.html">great</a> <a href="http://blogs.perl.org/users/ovid/2012/03/major-dbcolor-update-perl-qa-hackathon.html">things</a> <a href="http://ddumont.wordpress.com/2012/04/05/my-activities-during-perlqa-hackathon-in-paris/">that</a> <a href="https://twitter.com/search/%40perlqa2012">happened</a> <a href="http://2012.qa-hackathon.org/qa2012/wiki?node=Results">there</a>. I guess it's my turn to share:<br />
<br />
I got there thursday night, after just a couple of minutes lost at Gare du Nord trying to find the right Metro track, nothing my poor french (and a lot of pointing at maps/signs) couldn't solve. I shared the hotel room with Leon Timmermans, who arrived just a few minutes after I had settled in. Turns out Leon is not only a great Perl hacker, but also a very nice guy.<br />
<br />
I was a little apprehensive about waking up in time - I want to say "jetlag" here, but truth is I'm just not really a morning person. Fortunately, the excitement of having a joint hacking session with several of my Perl heroes was much greater than my will to stay in bed.<br />
<br />
After talking to a few people and finding a nice spot to settle, I was ready to start hacking. I've been meaning to try and add CPAN Testers' support to Miyagawa's great cpanminus for quite a while now, and as it turned out so did he! We talked about some of the details and he was kind enough to help me through part of the cpanminus source code, as we discussed the implementation details.<br />
<br />
The first draft of the build.log parser was finished on that same day, so all I had to do was send the email, push things to CPAN and move to my next target, right? Wrong!<br />
<br />
As it happens, the CPAN Testers is much more than what is exposed to module authors and users. Its amazing reports and statistics are the result of a delicate and intricate mix of modules, protocols and systems that have to work on all sorts of environment and talk to each other all the time. I have the utmost respect and admiration for people like Barbie, Andreas König, David Golden, BinGOs and Ricardo Signes, and this only increased as I dug deeper and deeper on CPAN Testers' internals.<br />
<br />
<br />
David and Barbie patiently explained to me all the bits and pieces I needed to know, and about how a lot of the things that should be common to all CPAN Tester's clients were currently scattered around, some even with different implementations, and how great it would be if all clients - including my new cpanminus one - could share all that from a since module. They wanted to do this since the QA Hackathon in 2009, but never got around to it.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://farm6.staticflickr.com/5340/6913418898_df659b720d_q.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://farm6.staticflickr.com/5340/6913418898_df659b720d_q.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">...so I got a round tuit :-)</td></tr>
</tbody></table>
If we could pull this off, it would not only mean life getting much easier for the CPAN Testers' clients, but also that we'd finally be able to create a next generation system to take full advantage of the power of Metabase, sending even more information (and in a much more structured manner) to the infrastructure.<br />
<br />
<h3>
CPAN::Testers::Common::Client</h3>
This module aims to provide common utilities to CPAN Tester's clients, populating all Metabase::Facts and getting them ready to be sent via Test::Reporter. It even composes the legacy email for you with the data you provide. <a href="https://github.com/garu/CPAN-Testers-Common-Client">Code is already on github</a>, and I'll push it to CPAN as soon as it's stable and ready for consumption.<br />
<br />
<h3>
App::cpantesters</h3>
As work on CPAN::Testers::Common::Client started to take shape, I was able to plug it into the build.log parser and see it come to life. Code is pretty raw at this point as I want to make sure it's doing its thing correctly before making an actual application out of it - and before sending data to the servers! If you want to help, I encourage you to try it out and tell me whether it worked or blew up. I can be found on irc.perl.org as "garu", or you can just <a href="https://github.com/garu/App-cpantesters/issues">file a bug report</a> (in which case, please attach the unparsable build.log file if you can). <br />
<br />
Here's how to do beta-test it:<br />
<br />
1. download and install <a href="https://github.com/garu/CPAN-Testers-Common-Client">CPAN::Testers::Common::Client</a> from github;<br />
2. download <a href="https://github.com/garu/App-cpantesters">App::cpantesters</a> from github (no installation yet);<br />
3. mkdir /tmp/reporter<br />
<br />
After that, just use cpanm to install modules as you normally would. After each attempt, whether it passed or failed, go to App::cpantesters' base directory and do:<br />
<br />
perl -Ilib bin/cpantesters.pl<br />
<br />
You should see some debugging info on the terminal, and after it's done you can see the reports it generated in /tmp/reporter. The files are plain text, so just open them in your favourite text editor and make sure everything seems ok!<br />
<br />
<h4>
HC SVNT DRACONES</h4>
<br />
The modules above are not ready for general public consumption by the time of this writing - which is why they write to disk instead of sending to CPAN Testers. I still need to coordinate with Andreas whether the email itself is parseable, and with him, Barbie, David and BinGOs as to adapt the CPAN Testers toolchain to use CTCC, send/receive the data from new Metabase Facts, and maybe extracting even more "moving parts" into CTCC, and now that the QA Hackathon is over it might take a bit more time. But it was already a great step forward!<br />
<br />
<h3>
All work and no play?</h3>
Every night after the hackathon we'd get together for dinner and hung out afterwards. I got a chance to see a 3D printer in action, play with the new Galaxy Tab, talk like a pirate (Arrrr! Thanks Wendy!), drink some Chartreuse, give a whole new meaning to my cleric's "turn undead" ability during a very cool Role Playing session, and travel from Stalingrad to Oberkampf (you had to be there).<br />
<br />
I also learned a lot just by listening to some of the conversation that went by, and got a chance to talk to some really smart people about their very cool projects, some which I might even tackle in the near-ish future.<br />
<br />
Oh, and yes. <a href="http://www.flickr.com/photos/61554145@N00/sets/72157629339948162/">There were pictures</a> =)<br />
<br />
See you next year in the UK!garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com2tag:blogger.com,1999:blog-7734799596325955005.post-18150292215781130722012-02-27T23:43:00.000-03:002012-02-28T00:42:05.298-03:00Perl Oasis 2012Last month I was able to attend to my very first international (non-brazilian) Perl conference: the Orlando Perl Workshop, also known as <a href="http://www.perloasis.info/opw2012/">Perl Oasis</a>.<div><br /></div><div>"Awesome" doesn't even begin to describe it.</div><div><br /></div><div><br /><a href="http://farm8.staticflickr.com/7179/6786473002_b7ec7328b4.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 500px;" src="http://farm8.staticflickr.com/7179/6786473002_b7ec7328b4.jpg" alt="" border="0" /></a><br />I was really excited about going. Not because it's a great conference (and it is!), but because it would be my first opportunity to meet all the amazing people behind the modules and applications I use. I've been talking to some of these people for years over at irc.perl.org, and it would be great to finally put a face and a body to their names and irc handles.<br /><br />Chris Prather (perigrin), the conference organizer and a long-time friend/boss, came pick me up in the Orlando Airport with his brother Mark. It was hard recognizing him because he's a bit <a href="https://secure.gravatar.com/avatar/72ca0434d6998fb97198f278926c6abf?s=130&d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fd3103c7c7366bf63e22299fd36a7ec2c%3Fs%3D130%26d%3Didenticon">camera shy</a>, but he found me in no time. He was way taller than I expected :)<br /><br />I arrived one day earlier at the venue and, when I asked where everybody was, I should have known the answer: the bar.<br /><br /><a href="http://farm8.staticflickr.com/7061/6786458742_cc35585b66.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 500px;" src="http://farm8.staticflickr.com/7061/6786458742_cc35585b66.jpg" alt="" border="0" /></a><br />As I got to the lobby, it was easy spotting mst. He was also much taller than I expected (I see a pattern here - maybe I'm the one that's shorter than expected :P). He was sitting next to Mark Keating, and they made me feel right at home, just as they did online when I worked for Shadowcat.<br /><br />The conference had <a href="http://www.perloasis.info/opw2012/schedule?day=2012-01-14">incredible talks</a>, but the thing that really impressed me was this overall feeling of "grassroots". There weren't that many people but no one really cared, because it wasn't meant to be a big event. It was meant to be something made by Perl hackers to other Perl hackers, in all levels. A conference where you could sit back and enjoy not only some mind-blowing talks but also a nice conversation with incredibly smart people like Florian Ragwitz, Casey West, David Golden, Steven Little, Cory Watson and so many others.<br /><span style="font-family:monospace;"><br /></span>To illustrate the point a bit further, the conference had a rented suite on the hotel where everybody would hang out after the talks up to late hours. From vodka-embalmed cherries (or whatever the hell that was) to hotel luggage carts filled with beer and huge piles of pizza, the conversation would quickly shift from SVs and AVs to the problems with Skyrim, and from architectural design and video tutorials to rock climbing and William Shatner singing Bohemian Rhapsody.<br /><br /><a href="http://farm8.staticflickr.com/7171/6694519807_5d374907d9.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 500px;" src="http://farm8.staticflickr.com/7171/6694519807_5d374907d9.jpg" alt="" border="0" /></a><br />I've brought home with me a huge level up in my Perl-fu. But, most importantly, I got a chance to hang out with some amazing people up to late hours, made new friends and had the best time ever. I can't wait for the 2013 edition of OPW!<br /><br />How about you? Do you remember your first international conference?<br /></div>garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com29tag:blogger.com,1999:blog-7734799596325955005.post-24043445108979080552012-01-03T06:02:00.004-02:002012-01-04T02:34:08.389-02:00The Perls of 2011Following my <a href="http://onionstand.blogspot.com/2010/12/2010-filled-with-perls.html">2010 post</a>, I thought I should register some of the great things that happened in the <a href="http://perl.org/">Perl programming</a> world in 2011. Only this time instead of turning it into a timeline, I'm going to place things in topics so you can just concentrate on what really matters :)<br /><br />Also, I'm only going to write about Perl 5. If you're looking for a Perl 6 retrospective, <a href="http://perlgeek.de/blog-en/perl-6/perl-6-in-2011.html">Moritz Lenz already did a very nice job with that</a> :)<br /><br />Apologies if I missed something - it's really hard to keep track of all the wonderful projects and conferences going on! Make sure to add them in the comments section below.<br /><br />So, without further ado, here are the "Perls of 2011".<br /><br /><span style="font-weight: bold;font-size:130%;" >Some Perl & CPAN stats</span><br /><br />According to <a href="https://www.ohloh.net/p/perl/">Ohloh</a>, over the course of 2011 there were nothing short of <span style="font-style: italic;">5975 commits</span> to the main Perl 5 repository. Wow! For comparison, Ruby had 3153 commits and PHP, 4461. We were a little short from our friends in the Python community, though, which had 6974 commits. Not bad, huh?<br /><br />The Perl 5 bugtracking system reports a total of 915 tickets created in 2011, and 928 tickets closed in that same period. That was close, but the awesome folks at p5p once again managed to keep the stats positive :)<br /><br />By the way, can you guess how many perl releases we had in 2011? 1? 3? more? 10? Try 21. <span style="font-style: italic;">Twenty one</span>, including development and stable releases!<br /><br />One of the coolest ones was, of course, perl 5.14, which brought us Unicode 6.0 support, new regex flags, the sugary "package Foo { }" syntax, improved IPv6 support and, as if these weren't enough, it uses even <span style="font-style: italic;">less</span> memory and CPU than previous releases!<br /><br />How about CPAN? 16197 distributions uploaded, of which 1873 were brand new!<br /><br /><span style="font-weight: bold;font-size:130%;" >Security</span><br /><br />The Common Vulnerabilities and Exposures had <a href="http://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cve_id=&query=&cwe_id=&cpe_product=cpe%3A%2Fa%3Aperl%3Aperl&cpe_version=&pub_date_start_month=0&pub_date_start_year=2011&pub_date_end_month=11&pub_date_end_year=2011&mod_date_start_month=-1&mod_date_start_year=-1&mod_date_end_month=-1&mod_date_end_year=-1&cvss_sev_base=&cvss_av=&cvss_ac=&cvss_au=&cvss_c=&cvss_i=&cvss_a=">5 entries tagged "perl"</a> in 2011, of which only 2 were actually regarding perl itself (namely, <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0761">CVE-2011-0761</a> and <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1487">CVE-2011-1487</a>). Again, for comparison, python also had 2 records, ruby had 7, and php had 36.<br /><br />Perl's commitment to stability and security was showcased in late december, when Alexander “alech” Klink and Julian “zeri” Wälde delivered a very nice talk at the 28th Chaos Communication Congress security conference in Berlin, entitled <a href="http://events.ccc.de/congress/2011/Fahrplan/attachments/2007_28C3_Effective_DoS_on_web_application_platforms.pdf" rel="nofollow" title="28c3 talk page">"Efficient Denial of Service Attacks on Web Application Platforms"</a>. Their work builds on top of an <a href="http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks">attack vector described in perlsec</a> and <span style="font-style: italic;">fixed back in 2003</span> (the long-since-deprecated 5.8.1), and shows the issue affects almost every other popular language for the web, including Python, Java, PHP, ASP.NET and JavaScript. Ruby fixed their code in 2008 and people should be fine as long as they use CRuby 1.9 and above.<br /><br /><span style="font-weight: bold;font-size:130%;" >The King is dead. Long live the King!</span><br /><br />For the past two years Jesse Vincent (obra) was our beloved Perl 5 Pumpking. Back in october he passed the torch to the incredibly prolific Ricardo Signes (rjbs), who will undoubtedly make us all very proud! A huge thanks is in order to both of them for the remarkable work they did last year - and that they'll undoubtedly keep on doing.<br /><br /><span style="font-weight: bold;font-size:130%;" >TPF Grants & Donations</span><br /><br />Dave Mitchell once again did an astounding work with his "Fixing Perl 5 Core Bugs". Last year alone he worked more than 470 hours, closing 29 tickets. Great job, Dave!<br /><br />In the middle of the year Nicholas Clark jumped on the wagon with his "Improving Perl 5" grant, approved with praise. So far Nick reported more than 380 hours of work, and tons of code to make Perl development even smoother.<br /><br />None of this would be possible without the wonderful support from several companies that are proud to use Perl, giving out not only their public praise but also donating infrastructure and money to help further develop the language. This year we saw some incredible support from <a href="http://www.booking.com/">Booking.com</a>, <a href="http://www.cpanel.net/">cPanel</a>, <a href="http://www.dijkmat.nl/">Dijkmat</a>, <a href="http://www.liquidweb.com/">Liquid Web</a>, <a href="http://www.net-a-porter.com/">Net-A-Porter</a>, the <a href="http://oslo.pm.org/">Oslo Perl Mongers</a>, <a href="http://www.perl-services.de/">perl-services.de</a>, and the <a href="http://vienna.pm.org/">Vienna Perl Mongers</a>.<br /><br /><span style="font-weight: bold;font-size:130%;" >Google Summer of Code (GSoC)</span><br /><br />Every year The Perl Foundation participates on the Google Summer of Code program, and 2011 was no exception. This time, 6 students were accepted and all of them made their mentors proud - 100% success rate! A huge thanks is in order for everyone that participated.<br /><br /><span style="font-weight: bold;">Google Code-in</span><br /><br />Another great initiative from Google in 2011 was the Code-in program, aimed at 13-17 year old school/college students with the idea of getting them involved with open source. The project is still running but we can already see some <a href="http://mdk.per.ly/2011/12/27/google-code-in-fit-the-third/">impressive results</a>, such as over 135 completed tasks.<br /><br />These numbers are great, and show that there's a big niche for Perl in schools and undergrad courses. I had the opportunity to <a href="http://onionstand.blogspot.com/2011/02/teaching-perl-to-undergraduates.html">teach Perl to undergrads</a> in a one-week course at the Federal University of Rio de Janeiro and the receptivity was incredible! If you have the chance to give a short free workshop at your local college/university, I highly recommend you do so :)<br /><br /><span style="font-weight: bold;font-size:130%;" >Conferences! Conferences! Conferences!</span><br /><br />All over the world, the vibrant Perl open-source community and their corporate sponsors filled the year 2011 with conferences showing the best modules, tools, techniques and design patterns, talking about a lot of bleeding-edge features and how to make Perl help with innovation and productivity for your enterprise.<br /><br /><span style="font-style: italic;">January:</span> Orlando Perl Workshop (OPW - a.k.a. The Perl Oasis)<br /><span style="font-style: italic;">February:</span> Frozen Perl, Bulgarian Perl Workshop<br /><span style="font-style: italic;">March:</span> Dutch Perl Workshop<br /><span style="font-style: italic;">April:</span> Toronto Perl Workshop, QA Hackathon<br /><span style="font-style: italic;">May:</span> São Paulo Perl Workshop<br /><span style="font-style: italic;">June:</span> Nordic Perl Workshop, French Perl Workshop, YAPC::NA<br /><span style="font-style: italic;">August:</span> YAPC::Europe<br /><span style="font-style: italic;">September:</span> Italian Perl Workshop, Portuguese Perl Workshop<br /><span style="font-style: italic;">October:</span> Ukrainian Perl Workshop, Pittsburgh Perl Workshop, Belgian Perl Workshop, German Perl Workshop, YAPC::Asia<br /><span style="font-style: italic;">November:</span> YAPC::Brasil, TwinCity Perl Workshop, London Perl Workshop<br /><span style="font-style: italic;">December:</span> Russian Perl Workshop<br /><br />Only July had no perl-centric conference. Quite impressive! And we're not even counting general conferences in which we participated such as FOSDEM, FISL, OSDC, OSCON, or even Perl Mongers tech meetings. Speaking of which...<br /><br /><span style="font-weight: bold;font-size:130%;" >Perl Mongers</span><br /><br />The number of active Perl Mongers group just keeps growing and growing. In 2011 alone, 15 new groups were spawned! Good luck to all our friends from AtlanticCity.pm (US), Makati.pm (PH), Bordeaux.pm (FR), HradecKralove.pm (CZ), Goiania.pm (BR), Petropolis.pm (BR), Brno.pm (CZ), Logan.pm (US), Tolyatti.pm (US), LGBT.pm, SouthernOregon.pm (US), Plzen.pm (CZ), Sendai.pm (JP), WestVirginia.pm (US) and Kerman.pm (IR).<br /><br />With these new additions, our tiny planet hosts 251 active Perl Mongers groups :)<br /><br /><span style="font-weight: bold;font-size:130%;" >Prominent Perl People in 2011</span><br /><br />This year we had some well-deserved White Camel Award winners: Leo Lapworth, Daisuke Maki and Andrew Shitov. Congratulations and thanks for making the Perl world better!<br /><br />There are several others whom also deserve a huge praise for last year's work, amongst them Mark Keating of Shadowcat/EPO/TPF, who is tirelessly working on quality Perl marketing; Gábor Szabó who started the <a href="http://perlweekly.com/">Perl Weekly</a> mailing list and a series of <a href="https://www.youtube.com/user/gabor529/videos">Video Tutorials</a>; and Thiago Rondon, who did huge things for the OpenData initiative, leading us (and Perl) into <a href="http://opendatabr.org/">projects</a> that added a lot of transparency to the Brazilian government and even resulted in a <a href="http://www.w3c.br/pub/Materiais/PublicacoesW3C/manual_dados_abertos_desenvolvedores_web.pdf">W3C Brazil OpenData Developer's Manual</a> (of which I'm proud to have been a part of) and in <a href="http://mdk.per.ly/2011/12/06/perl-rocks-latin-america/">winning the Latin America OpenData hackathon</a>.<br /><br />A couple of new, fun and downright useful websites were born in 2011, including <a href="http://perlnews.org/">Perl News</a> by Dave Cross, <a href="http://www.github-meets-cpan.com/">Github-Meets-CPAN</a> by Johannes Plunien; and <a href="http://prepan.org/">PrePan</a>, by Kentaro Kuribayashi. Important to notice that <a href="http://learn.perl.org/">learn.perl.org</a> was relaunched with a beautiful look and a lot of updated content. Great job, everyone!<br /><br />But there are also the silent workers, the ones that are mostly behind the scenes but whose efforts were paramount for the Perl 5 ecosystem. People like Karen Pauley, president of The Perl Foundation; and Barbie, who worked really hard in keeping the incredible <a href="http://cpantesters.org/">CPAN Testers</a> service up and running.<br /><br />In fact, a *HUGE* thanks are due to everybody involved in CPAN Testers in 2011: Barbie, Dave Golden, Chris Williams, David Cantrell, Slaven Rezić and just about everyone else. I had the great opportunity to help Dave Golden upgrade the cpan-reporter module to use metabase and I could see how intricate the whole thing is. By the way, did you know that in 2011 CPAN Testers crossed the barrier of over 1 million test reports in a single month? That's incredible!<br /><br />Speaking of which, what would be of Perl 5 without its core developers? Several of them were already mentioned and praised here, but you can check the full list of contributors in the <a href="https://metacpan.org/source/DROLSKY/perl-5.15.6/AUTHORS">AUTHORS file</a>, or in <a href="https://metacpan.org/module/perldelta">perldelta</a> for a more recent list. This year we had the pleasure of seeing commits from Father Chrysostomos, Florian Ragwitz, H.Merijn Brand, Karl Williamson, Claudio Ramirez, Vladimir Timofeev, Nobuhiro Iwamatsu and many, many others. Thanks, guys!<br /><br /><span style="font-weight: bold;font-size:130%;" >Perl Games</span><br /><br />The Perl gaming scene got yet another massive overhaul in 2011. Coming from all the hard work Kartik Thakore, Tobias Leich and everyone else at the SDL Perl project put in 2010, game development in Perl has never been this easy or fun.<br /><br />The <a href="http://sdlperl.ath.cx/releases/SDL_Manual.pdf">SDL Perl Manual</a> was finished early in the year, and we were having so much fun we threw together the <a href="http://yapgh.blogspot.com/2011/02/sdl-perl-game-contest.html">SDL Perl Game Contest</a> in march, resulting in a total of 16 new games written from scratch in just one month!<br /><br />The year also saw the coming of a <a href="https://metacpan.org/module/Box2D">Box2D wrapper for Perl</a>, letting us add some fast physics to games and simulations.<br /><br />But the best was yet to come. <a href="http://ue.o---o.eu/">Construder</a>, a jaw dropping 3D game created by Perl hacker Robin "elmex" Redeker, features futuristic settings with some nice graphics and an (almost) infinite world for you to build and play with. Make sure to check it out if you haven't already!<br /><br /><span style="font-weight: bold;font-size:130%;" >A Web of Perl</span><br /><br />Perl's most widely adopted web frameworks also kept extremely busy, and 2011 marked some pretty cool releases and announcements:<br /><br />Catalyst 5.9 was released back in august, incorporating Plack as its default Engine. This change benefits Catalyst significantly by reducing the amount of code inside the framework, getting upstream bug fixes in <a href="https://metacpan.org/module/Plack">Plack</a>, and automatically gaining support for any web server which a <a href="https://metacpan.org/module/PSGI">PSGI</a> compliant handler is written for.<br /><br />Mojolicious saw a total of 122(!) releases, including its 2.0 one, and now features updated websockets support, documentation enhancements and several asynchronous/non-blocking features. You can check out the <a href="http://marcus.nordaaker.com/2011/12/a-mojolicious-2011/">official Mojolicious 2011</a> retrospective for the full monty.<br /><br />The nice folks of Dancer started working on a massive core rewrite that will help the project tremendously. Among the changes being made, there will be no more globals in the core, 100% object-oriented backend, better scoping for sub-applications, and a better design overall.<br /><br /><span style="font-weight: bold;font-size:130%;" >Advent Calendars</span><br /><br />The tradition remains, and the 2011 <a href="http://perladvent.org/2011/">Perl</a> <a href="http://www.catalystframework.org/calendar/2011/">Advent</a> <a href="http://advent.perldancer.org/2011">Calendars</a> are filled with great content ranging from beginner tips to advanced hacks. The Japanese Perl Community once again delivered several <a href="http://perl-users.jp/articles/advent-calendar/2011/">high-quality articles in 9 different tracks</a>, while the Brazilian Perl Community <a href="http://sao-paulo.pm.org/artigos">scattered their great articles</a> throughout the two months of the Equinox.<br /><br /><span style="font-weight: bold;font-size:130%;" >Books</span><br /><br />O'Reilly has been busy in 2011, with the updated <a href="http://shop.oreilly.com/product/0636920018452.do">6th edition of Learning Perl</a> - the <span style="font-style: italic;">Llama</span> - by Randal Schwartz, brian d foy and Tom Phoenix, and Johan Vromans' handy <a href="http://shop.oreilly.com/product/0636920018476.do">Perl Pocket Reference</a>. They're also getting ready for the 4th edition of Programming Perl - the <span style="font-style: italic;">Camel</span> - to be released in early 2012. Heck, at O'Reilly <a href="http://twitter.com/#%21/LaurieP/status/142634633337643008">they even used Perl to pick their Secret Santa</a> :)<br /><br />Speaking of upcoming titles, Ovid's <a href="http://blogs.perl.org/users/ovid/2012/01/beginning-perl---table-of-contents.html">Beginning Perl</a> and chromatic's <a href="https://github.com/chromatic/little_plack_book">Little Plack Book</a> are ones to keep an eye for. Who knows, maybe I'll get to talk a bit more about them in the 2012 wrap-up? I look forward to it!<br /><br /><span style="font-weight: bold;font-size:130%;" >Rise of The MetaCPAN</span><br /><br />If you were one of the early adopters, you know MetaCPAN was actually born on late 2010 (november 3rd, to be precise). The project had some ambitious goals: provide a free and open sourced alternative search engine to the ever-glorious CPAN. But in 2011 it became more. So much more.<br /><br />Moritz "Mo" Onken, a student at the Karlsruhe Institute of Technology (KIT), <a href="http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/mo/1">applied for the GSoC</a> and quickly became a hero. Sure, he already had several years of Perl background, but what Clinton Gormley, Olaf Alders and himself achieved in 2011 exceeded all expectations and revolutionized the Perl world.<br /><br />MetaCPAN is not only a sophisticated and fast CPAN search engine, but also offers a full featured REST API that lets you build on top of it making all sorts of complex search queries for extracting data from and about the CPAN. Another (very) important aspect: an active and vibrant community that actually encourages people to send patches fixing bugs and adding new features.<br /><br /><span style="font-weight: bold;font-size:130%;" >Featured Perl Modules</span><br /><br />Wrapping up the retrospective, I should go about some of the cool new modules that spawned in 2011. This is not meant to be a thorough list, just a small snippet for your viewing pleasure:<br /><br /><a href="https://metacpan.org/module/Mason"><span style="font-weight: bold;">Mason 2</span></a> - The traditional HTML::Mason distribution received a major overhaul and became just "Mason". The new distribution is being very actively developed and has a much more modern architecture. <a href="http://www.openswartz.com/2011/02/21/announcing-mason-2/">Check out the changes</a> and give it a try!<br /><br /><a href="https://metacpan.org/module/dip"><span style="font-weight: bold;">dip</span></a> - this nifty new tool offers dynamic instrumentation like DTrace, using aspects. Marcel Grünauer builds on top of Adam Kennedy's awesome <a href="https://metacpan.org/module/Aspect">Aspect Oriented Programming (AOP) Perl interface</a> (that also reached 1.0 in 2011) to provide a tool that lets you change application's behavior without actually touching the source code. Very nice!<br /><br /><a href="https://metacpan.org/module/Lucy"><span style="font-weight: bold;">Lucy</span></a> - David Wheeler released a nice Perl wrapper for <a href="http://incubator.apache.org/lucy/">Apache Lucy</a>, a high-performance, modular full-text search engine library that assimilated the KinoSearch codebase and community.<br /><br /><span style="font-size:100%;"><a href="https://metacpan.org/module/Data::Printer"><span style="font-weight: bold;">Data::Printer</span></a></span> - I don't like to talk about stuff I wrote doing general retrospectives, but I'm going to open an exception here. Data::Printer provides a simple and powerful - not to mention, colorful! - way to view your data structures. It's highly customizable and if you ever used Data::Dumper to view variable contents on the screen, you should give it a try :-)<br /><span style="font-weight: bold;"></span><br />There were also some visible trends on CPAN last year:<br /><br /><span style="font-weight: bold;">Towards a lighter Moose</span>: everybody loves Moose (which also reached 2.0 in 2011!), but sometimes you just want - or think you just want - the sugary OO syntax, not the full-blown object system. Or maybe your particular environment doesn't let you install it, and you still need some small piece of it to make everything better. In 2011 there were a lot of uploads for Moose and Mouse alternatives, including Moo, Mo, and Mite. This definitely shows an itch that needs some scratching.<br /><br />On a somewhat related note, Stevan Little is developing a <a href="https://github.com/stevan/p5-mop">proposal and a functioning prototype</a> for a Meta Object Protocol, or MOP, to be perhaps included in a future version of Perl 5. Comments are welcome!<br /><br /><span style="font-weight: bold;">Sysadmin tools:</span> Matt S. Trout took the time to bolt some modules together and bring us <a href="https://metacpan.org/module/Tak">Tak</a>, a multi-host remote control over ssh. But he wasn't the only one, and new sysadmin tools and modules sprouted all over the perlverse. Some fine examples include <a href="https://metacpan.org/module/helm">helm</a>, providing easy server and cluster automation, and the <a href="http://rexify.org/">great Rex</a> (or, rather, "(R)?ex"), that lets you manage all your boxes from a central point through the complete process of configuration management and software deployment. Check out <a href="http://rexify.org/">rexify.org</a> for a quick glimpse of some of its features!<br /><br /><span style="font-weight: bold;">Simple ORMs:</span> another trend in 2011 was to create simple DBI wrappers providing ORM-ish features, resulting in lightweight frameworks somewhere between DBI and DBIx::Class. Among the new distributions are <a href="https://metacpan.org/module/Teng">Teng</a> and <a href="https://metacpan.org/module/DBIx::Sunny">DBIx::Sunny</a>.<br /><br /><span style="font-weight: bold;">Dependency Managers:</span> Finally, following Ingy's "<a href="https://metacpan.org/module/only">only</a>" pragma from back in 2003, a lot of effort has been put into making new and improved dependency managers for Perl applications and distributions. Miyagawa's <a href="https://metacpan.org/module/carton">carton</a> and Gugod's <a href="https://metacpan.org/module/perlrocks">perlrocks</a> deserve particular attention.<br /><br /><br /><span style="font-style: italic;">That's it for this 2011 Perl retrospective. Hope you guys had as much of a nice time reading it as I had writing it. Let 2012 be the year of the Velociraptor!!</span>garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com8tag:blogger.com,1999:blog-7734799596325955005.post-34552259141012170642011-05-30T06:19:00.001-03:002011-05-30T06:19:00.113-03:00Data::Printer - a colored pretty printer for Perl<span style="font-style: italic;">Wait, stop. Is this Yet Another Data::Dumper?</span><br /><br />Well, yes and no. Data::Dumper (and friends) are meant to stringify data structures in a way that makes them still suitable for being <span style="font-size:85%;"><span style="font-family:courier new;">eval</span></span>'ed back in. That's really awesome, but poses a huge constraint over pretty-printers. Earlier this year, brian d foy talked about the <a href="http://www.effectiveperlprogramming.com/blog/312">amazing powers of Data::Dump</a>, but it still suffers from those constraints. Same goes for the (also great) <a href="http://search.cpan.org/perldoc?Data::Dump::Streamer">Data::Dump::Streamer</a>.<br /><br />Here's a quick visual comparison between the ever popular Data::Dumper and the new <a href="http://search.cpan.org/perldoc?Data::Printer">Data::Printer</a>:<br /><br /><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7t4_ip8HTw_Hm0U3DZYMRiIOZz0KIfgDgwGsk1UshV7kS8WsazgUsOoDjIr-fL-O9vt282iMCwLeIAZMBKoSkbi-Aoa2uFUpthPv8IfjH6N3wT5sdc_VVAMV86rCrvbAIbxWm41H2iGmA/s1600/dataprinter-1.png" alt="" id="BLOGGER_PHOTO_ID_5612389546379166850" border="0" /><br /><br />First thing you'll notice is the colored output, indexed arrays and a little extra regex information. But <a href="http://search.cpan.org/perldoc?Data::Printer">Data::Printer</a> offers much more than that. How about debugging objects?<br /><br /><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvKMWKnHOd6gkL6hecXxSrzxYFYycFX-qAm5cAGpFSqB9jADXW_JC-4dBMm_TqHKYzLuyNIdYnyNonMxTd6rRabwHjApwSOgBkNy4x5RSrSc1zOUHbfMxEbkdzcOHF-D5JupLsyx2kClcx/s1600/dataprinter-2.png" alt="" id="BLOGGER_PHOTO_ID_5612403142388478738" border="0" /><br /><br />And what if your data is attached to others?<br /><br /><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-ogCtpiJf_mYb6a-s6ATfzXsYd6ODmtpKL_fnPsABXb4oJ_Q-1NyDTZrL66EDoDOdVp8ISI1UDDiBurClgVYFlU-j6rUkuIiG10lI916tDNLqMTpqmocwkIvtct6v-e6d9OVzmn9zMSkA/s1600/dataprinter-3.png" alt="" id="BLOGGER_PHOTO_ID_5612405304478380802" border="0" /><br /><br />The idea behind Data::Printer is that most developers (at least to my experience) use such tools mostly just to see what's going on inside their variables and objects, not to serialize data in and out of Perl. So I decided to make a module that would focus on that: <i>display Perl variables and objects on screen, properly formatted</i> (to be inspected by a human). Data::Printer is somewhat similar to Ruby's "<a href="https://github.com/michaeldv/awesome_print">awesome_print</a>", but I made sure to include more customization options and some neat features present in Perl's data dumpers.<br /><br />For example, I called the printer function "<span style="font-size:85%;"><span style="font-family:courier new;">p()</span></span>" as it's nice and short and should steer clear of name collisions. But if you're so used to calling "<span style="font-size:85%;"><span style="font-family:courier new;">Dumper()</span></span>" in your code it just comes out naturally while you type, you can try this:<br /><pre class="sh_perl sh_sourceCode"> <span class="sh_keyword">use</span> Data<span class="sh_symbol">::</span>Printer alias <span class="sh_symbol">=></span> <span class="sh_string">'Dumper'</span><span class="sh_symbol">;</span><br /><br /><span class="sh_function"> Dumper</span><span class="sh_symbol">(</span> <span class="sh_variable">%foo</span> <span class="sh_symbol">); # there, problem solved!</span></pre><br />Data::Printer comes with (I hope!) very sane defaults, so usually all you have to do is "<span style="font-family:courier new;">use Data::Printer</span>" (or even shorter: "<span style="font-family:courier new;">use DDP</span>") and start peeking at data structures with the exported "<span style="font-size:85%;"><span style="font-family:courier new;">p()</span></span>" function. But pretty is a matter of personal taste, and from colors to array indexes to the hash separator and their default values, you can <a href="http://search.cpan.org/perldoc?Data::Printer#CUSTOMIZATION">customize just about anything</a>!<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >Sounds neat, but I'm not gonna type all that every time!</span><br /><br />And you shouldn't - which is why Data::Printer looks for a file called <code>.dataprinter</code> in your home directory and lets you keep all your preferred settings right there, so you only have to worry about it once :-)<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >Filters</span><br /><br />There are times when you don't really wish to see an entire object's internals during your review, just that important piece of information that you're holding in it. Data::Printer also offers you the ability to easily add filters to override any kind of data display:<br /><br /><pre class="sh_perl sh_sourceCode"><span class="sh_keyword"> use</span> Data<span class="sh_symbol">::</span>Printer filters <span class="sh_cbracket">=> {</span><br /><span class="sh_string"> 'DateTime'</span> <span class="sh_symbol">=></span> <span class="sh_keyword">sub</span> <span class="sh_cbracket">{</span> <span class="sh_variable">$_</span><span class="sh_symbol">[</span><span class="sh_number">0</span><span class="sh_symbol">]-></span>ymd <span class="sh_cbracket">}</span><span class="sh_symbol">,</span><br /><span class="sh_string"> 'HTTP::Request'</span> <span class="sh_symbol">=></span> <span class="sh_keyword">sub</span> <span class="sh_cbracket">{</span> <span class="sh_variable">$_</span><span class="sh_symbol">[</span><span class="sh_number">0</span><span class="sh_symbol">]-></span>uri <span class="sh_cbracket">}</span><span class="sh_symbol">,</span><br /><span class="sh_cbracket"> }</span><span class="sh_symbol">;</span></pre><br />If your filters are too complex you can <a href="http://search.cpan.org/perldoc?Data::Printer::Filter">create them as a separate module</a> and load them by name. You can even upload them to CPAN so others can benefit from it! In fact, Data::Printer already ships with some (hopefully useful) filters for the whole DateTime family of modules (not just DateTime, but also Time::Piece and friends), and some Database ones as well (currently DBI and DBIx::Class):<br /><br /><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO03Gut1ByZO-Or-hX71Uze1Ludt2GMRxldkugSnpBnouzpHYHpxVlaEoB9UrBoQQURtB-bUftx2dzZ0QocFqehAuEJZdavZVtuAXGPczDfIL4Tg8mZR1i0MRIAz2kncRqF2cgJLmTrnLn/s1600/dataprinter-4.png" alt="" id="BLOGGER_PHOTO_ID_5612416052878262210" border="0" /><br /><br />You can also make your classes Data::Printer-aware simply by adding a _data_printer() function to them. You don't have to add Data::Printer as a dependency at all, and it will use that function to filter your class by default instead of doing a regular dump.<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >In Short...</span><br /><br />If you want to serialize/store/restore Perl data structures, this module will NOT help you, and you should try other solutions such as the Dumper/Dump family, <a href="http://search.cpan.org/perldoc?Storable">Storable</a>, <a href="http://search.cpan.org/perldoc?JSON">JSON</a>, or whatever you can find on CPAN.<br /><br />But if you only care about seeing what's going on inside your data structures and objects, give <a href="http://search.cpan.org/perldoc?Data::Printer">Data::Printer</a> a try! Oh, and if you're into REPLs, you can add it as your default <a href="http://search.cpan.org/perldoc?Devel::REPL::Plugin::DataPrinter">dumper for Devel::REPL</a> too =)<br /><br /><a href="https://github.com/garu/Data-Printer">Code is on github</a>. Comments, feature requests, bug reports and patches are welcome!garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com25tag:blogger.com,1999:blog-7734799596325955005.post-91559545030503846402011-05-13T17:19:00.005-03:002011-05-13T17:20:46.208-03:00The *REAL* Perl Ironmen =)Last Saturday (May 7) there was a huge Perl event in Brazil - the <a href="http://perlworkshop.com.br/">São Paulo Perl Workshop</a>! It was a full-day conference with several awesome talks, featuring brilliant international keynotes like brian d foy, Brad Fitzpatrick and Larry Wall himself! The workshop also contained some of our local talent like Eden Cardim, Thiago Rondon and Solli Honório, and even talks from W3C and brazilian companies relying on Perl for their core businesses. We had around 100 attendants, making this one of the largest Perl events in the world!<br /><br />But here's where it really heats up: We were on the Rio Perl Mongers mailing list, calmly discussing how to get to São Paulo for the workshop - you know, renting a bus, getting on the same flight, that sort of thing - when Diogo suggested we use other, less convenient, means of transportation.<br /><br /><span style="font-style: italic;">Bicycles.</span><br /><br />Now, for those of you that are unfamiliar with Brazil, here's a little geography lesson. It's the 5th largest country in the world, and although in adjacent States, the distance from Rio to São Paulo is over 480km (298.3 miles), most of it UPHILL. It beats NYC to Washington DC by 150km (93 miles), Tokyo to Kyoto by 110km (68 miles), and London to Paris by over 140km (87 miles)! Of course, being a mailing list of mostly brazilian people, we all knew that already. So when Diogo tossed in the air such an absurd idea, bearing on the clinically insane, there was only one thing we could do.<br /><br />We said <span style="font-style: italic;">"Hell, yeah!!"</span><br /><br />There were 4 of us in total for the adventure: MDA on the "safety car", Marcio, Diogo and myself riding the bikes. Marcio is actually from São Paulo, and would come to Rio by plane with his bike only so he could ride with us!<br /><br /><span style="font-weight: bold;font-size:130%;" >Plan and Preparations</span><br /><br />A friend of mine is actually a professional trainer for a big team here in Rio, and agreed to help us get into shape and plan for the ride - granted, her wording was more in the line of "I'll do my best to help you not die", after a few minutes of screaming about how crazy we were. We only had two weeks(!!) to prepare so we'd need all the help we could get. Thanks coach!<br /><br />Once we started taking it really serious and got our feet back on the ground, we realized there were some problems with the journey. Thing is, even at an extremely generous 25km/h rate (did I mention most of the way is uphill?) we'd still take over <span style="font-style: italic;">20 hours straight</span> to reach São Paulo. That's at least two days, and unlikely to happen. Getting the friday off was not that big a deal, but there was little chance we'd all be excused for thursday too. So we decided to cycle from 7am until it got dark, at which point we'd get in the safety car and finish the travel. After all, we had a Workshop to attend ;-)<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >Surely, nothing can go wrong! Oh, wait...</span><br /><br /><br />Marcio missed his flight, and had to travel by bus to Rio overnight. MDA faced a lot of traffic jams and we could only reach Marcio at the bus station by 9am. Then Marcio found out his bike's fork broke during the travel, and we had to find a place to quickly fix or replace it. With all that trouble, it was only 2pm when we finally hit the road!<br /><br /><div style="text-align: center;"><a href="http://www.flickr.com/photos/61554145@N00/5708033448/" title="Marcio had minor bike issues, on Flickr"><img style="margin: 0pt 0pt 10px 10px; cursor: pointer;" src="http://farm3.static.flickr.com/2077/5708033448_a04a3d8203_m.jpg" alt="Marcio had a tiny issue with his bike" height="180" width="240" /></a><br /></div><br /><br />On the highway, we started pedaling on the side of the road, and found out the hard way there were a lot of places with no "side of the road" at all! Whenever we found such places we had to get back in the car and wait until it was safe again. It was a nuisance, but no one had a death wish.<br /><br /><div style="text-align: center;"><a href="http://www.flickr.com/photos/61554145@N00/5712357319/" title="that was actually an easy one, on Flickr"><img style="margin: 0pt 0pt 10px 10px; cursor: pointer;" src="http://farm3.static.flickr.com/2500/5712357319_5cd9022353_m.jpg" width="240" height="160" alt="that was actually an easy one"></a><a href="http://www.flickr.com/photos/61554145@N00/5707561443/" title="Warning: side of the road missing, on Flickr"><img style="margin: 0pt 0pt 10px 10px; cursor: pointer;" src="http://farm4.static.flickr.com/3068/5707561443_e2dd767a62_m.jpg" alt="warning: side of the road missing" height="180" width="240" /></a><br /></div><br />It was really scary to ride next to giant trucks and speeding cars, and to see several pieces of tire torn off from trucks on the way.<br /><div style="text-align: center;"><a href="http://www.flickr.com/photos/61554145@N00/5712348833/" title="you know, kinda like this, on Flickr"><img style="margin: 0pt 0pt 10px 10px; cursor: pointer;" src="http://farm4.static.flickr.com/3582/5712348833_522052da82_m.jpg" width="160" height="240" alt="you know, kinda like this"></a></div><br />At some point we even had to quickly move to the "side of the side of the road" - whatever that means - to avoid being hit by a car traveling against the traffic, on our lane!!<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >Conclusion</span><br /><br />It was a 4 hour ride and, albeit exhausted, we had a lot of fun! It was a nice opportunity to exercise outdoors, see some great sights and even raise awareness of the local IT community to the Workshop and to Perl itself - there was a lot of joking around because "<span style="font-style: italic;">camel</span>" in portuguese is also a slang for bicycles =)<br /><br /><div style="text-align: center;"><br /><object type="application/x-shockwave-flash" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="300" width="400"> <param name="flashvars" value="intl_lang=en-us&photo_secret=ecb45c778e&photo_id=5707600905"> <param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"> <param name="bgcolor" value="#000000"> <param name="allowFullScreen" value="true"><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&photo_secret=ecb45c778e&photo_id=5707600905" height="300" width="400"></embed></object><br /></div><br /><br />As a reward, we got the chance to be in a great workshop with fellow Perl hackers. Now who knows, maybe this november for the <a href="http://yapcbrasil.org.br">YAPC in Rio</a> we'll travel back from São Paulo ;-)<br /><br /><div style="text-align: center;"><br /><a href="http://www.flickr.com/photos/61554145@N00/5713808155/" title="the cycling team and their reward, on Flickr"><img src="http://farm4.static.flickr.com/3114/5713808155_1dcf0ddc30.jpg" alt="the cycling team and their reward" height="375" width="500" /></a><br /></div><br /><br />Oh, and if you're interested in more pics of the journey and the conference itself, <a href="http://www.flickr.com/photos/61554145@N00/sets/72157626567355471/with/5712348833/">here they are</a> :)garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com3tag:blogger.com,1999:blog-7734799596325955005.post-50713990664605147692011-04-30T04:29:00.000-03:002011-04-30T04:29:00.055-03:00Catalyst in the CloudA lot of buzz was generated recently in the Perl community after <a href="http://www.dotcloud.com/">DotCloud</a>, a big <a href="http://en.wikipedia.org/wiki/Platform_as_a_service">PaaS</a> player, introduced its <a href="http://blog.dotcloud.com/dotcloud-introduces-camel-as-a-service-with-i">brand new Perl stack</a>, letting developers deploy modern Perl web applications into the "Cloud" without having to worry about the underlying system at all.<br /><br />DotCloud already provides a nice <a href="http://docs.dotcloud.com/components/perl/">Dancer example</a>, and sri was diligent enough to provide a <a href="http://blog.kraih.com/mojolicious-in-the-cloud-hello-dotcloud">Mojolicious example</a> as soon as he got his hands on an account. So when I got my own invitation to the service, I wondered how Catalyst would stand to the challenge.<br /><br />After going through the whole thing in just a couple of minutes, all I can say is that:<br /><br /><span style="font-style: italic; color: rgb(0, 0, 0);">If you were ever scared or concerned of using Catalyst due to its dependencies and how hard it would be to deploy... you're out of excuses =)</span><br /><br /><br />So, without further ado, here's the Catalyst DotCloud deploy process!<br /><br />Install the "dotcloud" app in your local machine:<br /><br /><span style="font-weight: bold;font-family:courier new;" > $ sudo apt-get install python-setuptools</span><br /><span style="font-weight: bold;font-family:courier new;" > $ sudo easy_install dotcloud</span><br /><br />Create a DotCloud namespace (I called it "catalyst")<br /><br /><span style="font-weight: bold;font-family:courier new;" > $ dotcloud create catalyst</span><br /><br />Deploy a Perl stack into that namespace:<br /><br /><span style="font-weight: bold;font-family:courier new;" > $ dotcloud deploy -t perl catalyst.www</span><br /><br />Create a sample Catalyst app (skip if you already have one) and enter its directory:<br /><br /><span style="font-weight: bold;font-family:courier new;" > $ catalyst.pl CatalystCloud<br /></span><span style="font-weight: bold;font-family:courier new;" > $ cd CatalystCloud</span><br /><br />DotCloud uses the "<span style="font-family:courier new;">static</span>" dir for static files, so let's create a symbolic link there for Catalyst's <span style="font-style: italic;font-family:courier new;" >root/static</span>, or wherever else you placed your static files. There are probably other ways to customize this with DotCloud's standard configuration and its nginx server, but I just joined and haven't fiddled with any docs yet :)<br /><br /><span style="font-weight: bold;font-family:courier new;" > $ ln -s root/static static</span><br /><br />Add PSGI support for your Catalyst app. We could try the built-in FastCGI run script, but the recommended way is PSGI. To do that, simply install Catalyst::Engine::PSGI and create the new helper for your app, naming it "<span style="font-family:courier new;">app.psgi</span>" in your app's base directory:<br /><br /><span style="font-weight: bold;font-family:courier new;" > $ cpan Catalyst::Engine::PSGI</span> (or cpanm, or whatever you like)<br /><span style="font-weight: bold;font-family:courier new;" > $ script/catalystcloud_create.pl PSGI</span><span style="font-weight: bold;"><br /></span><span style="font-weight: bold;font-family:courier new;" > $ ln -s script/catalystcloud.psgi app.psgi</span><br /><br />The "<span style="font-family:courier new;">app.psgi</span>" file needs to know how to find your app, so add a <span style="font-style: italic; color: rgb(255, 102, 0);font-family:courier new;" >use lib 'lib';</span> statement to it, right after "<span style="color: rgb(255, 102, 0); font-style: italic;font-family:courier new;" >use warnings</span>". The final file should look something like this (replacing "<span style="font-family:courier new;">CatalystCloud</span>" with your app's name, of course):<br /><br /><span style="font-family:courier new;"> #!/usr/bin/env perl<br /> </span><span style="font-family:courier new;">use strict;</span><br /> <span style="font-family:courier new;">use warnings;</span><br /> <span style="font-family:courier new;">use lib 'lib';</span><br /> <span style="font-family:courier new;">use CatalystCloud;</span><br /> <span style="font-family:courier new;">CatalystCloud->setup_engine('PSGI');<br /> </span><span style="font-family:courier new;">my $app = sub { CatalystCloud->run(@_) };</span><br /><br />Remember to add the new dependency to your app's Makefile.PL, so DotCloud knows what's required when it deploys:<br /><br /><span style="font-family:courier new;"> requires 'Catalyst::Engine::PSGI';</span><br /><br />Your application is ready; let's push it to DotCloud:<br /><br /><span style="font-weight: bold;font-family:courier new;" > $ dotcloud push catalyst.www .</span><br /><br />Now sit back and watch as DotCloud smoothly walks through all of Catalyst's dependencies and deploys your app to the Web. Sweet!<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKQSYy5tgnvQ4hG5vbRvB8lSZ1OA32Kf62k2zdTGQ9wHZpCOomaUOosVzk9VOLfhtXOwm4lvYzOnExsodx5G6WmnbXThnSWl2XoQFVNiBUED4q6p02WUbyrDhPtsXdgiuE86aPovGx9TjV/s1600/catalyst_dotcloud.png"><img style="cursor: pointer; width: 400px; height: 394px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKQSYy5tgnvQ4hG5vbRvB8lSZ1OA32Kf62k2zdTGQ9wHZpCOomaUOosVzk9VOLfhtXOwm4lvYzOnExsodx5G6WmnbXThnSWl2XoQFVNiBUED4q6p02WUbyrDhPtsXdgiuE86aPovGx9TjV/s400/catalyst_dotcloud.png" alt="" id="BLOGGER_PHOTO_ID_5601266623672334802" border="0" /></a><br /><br />Once you start working on your application, remember to keep your Makefile.PL up-to-date, adding any and all dependencies to it (like Catalyst::View::TT and Catalyst::Model::DBIC::Schema). But you already do that, don't you?<br /><br />If you run into trouble, give "<span style="font-family:courier new;">dotcloud logs catalyst.www</span>" a try (again, replacing the <span style="font-style: italic;">catalyst.www</span> namespace with your app's) and browse through you application's logs in real time. If you left the <span style="font-style: italic;">-Debug</span> flag on, you can even see Catalyst's messages on the fly.<br /><br />Many thanks are in order to the ever-awesome <a href="http://bulknews.typepad.com/">Miyagawa</a> and the whole DotCloud team for making deploying Perl applications such a breeze =)<br /><br />Have fun!!garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com5tag:blogger.com,1999:blog-7734799596325955005.post-41008634555870340832011-02-25T17:17:00.004-03:002011-02-25T17:17:39.497-03:00The SDL Perl Game Contest!Sure, you know what <a href="http://libsdl.org/">SDL</a> is, right? Well, SDL has <a href="http://search.cpan.org/perldoc?SDL">very nice Perl bindings</a> that let you use the power and flexibility of Perl to write awesome games in no time!<br /><br />There's even a <a href="http://sdlperl.ath.cx/releases/SDL_Manual.pdf">manual to help you get started</a>, including full game tutorials and a list of free/open-source resources for your games, like sprites, sound effects and music.<br /><br />But by far the Coolest Game Ever<span class="term">™</span> is the one <span style="font-weight: bold;">*you*</span> write, from that silly idea you had the other day to a playable game you and your friends can enjoy.<br /><br />And this march, the SDL Perl team is going to help you take that project out of your dusty drawer of "TODO"s and turn it into a reality, with the <span style="font-weight: bold;">SDL Perl Game Contest</span>!<br /><br />The rules are simple, and much like the <a href="http://ironman.enlightenedperl.org/">Perl Ironman</a> contest:<br /><br /><div style="text-align: center;"><span style="font-style: italic;">"One game per week. Every week of march."</span><br /></div><br />This means by the end of march you'll have not one, but FOUR games to show for. How cool is that?!<br /><br />In fact, you can even make your weekly game the subject of your Ironman posts this month, and take out two birds with one stone (hmm... more game ideas)!<br /><br />This monday (feb. 28), start writing your game! You have until the following monday to make it playable ("complete") and start all over again with a brand new game for the next week.<br /><br /><span style="font-weight: bold;font-size:130%;" >But what if I miss a deadline? What if I can't start this monday?</span><br /><br />It doesn't really matter - just join the party and have some fun! Even if you only get to do one game, it's still a great opportunity to improve your skills and learn a bit about game design and development.<br /><br />If you need any assistance writing your game, from ideas to code, WE WILL HELP! Just send an email to the SDL Perl mailing list with your questions (subscribe by sending an empty email to <span style="font-style: italic;">sdl-devel-subscribe@perl.org</span>, then fire your questions to <span style="font-style: italic;">sdl-devel@perl.org</span>) or, better yet, join us live in #sdl over at irc.perl.org and we'll be more than happy to assist you and try your game out. If you never used irc before, please keep in mind people might be busy or in different timezones than you, so you may get instant responses or have to wait a few of hours before you get a reply. Be patient!<br /><br />It can be a game about anything. Just make sure it's doable in a week. Some games take years to be complete, but you might be surprised at how much you can accomplish in just a few hours with SDL Perl :)<br /><br />Oh, there's one extra rule, actually, and that's mandatory - <span style="font-weight: bold;">HAVE FUN!! :)</span>garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com3tag:blogger.com,1999:blog-7734799596325955005.post-11673817093632163042011-02-18T14:02:00.001-02:002011-02-18T14:04:46.338-02:00Teaching Perl to Undergraduates<a href="http://perl.org/">Perl</a> is an amazing programming language. And, with its growing worldwide re-popularization, it was an easy sell to the <a href="http://dcc.ufrj.br/">Computer Science Department</a> of the <a href="http://ufrj.br/">Federal University of Rio de Janeiro</a>, one of the best and most famous universities in Brazil, when I offered to give a free Perl summer class to the undergrads.<br /><br />The idea was to give students the opportunity to learn a new language, presenting the concepts, structure, best practices and design patterns of modern Perl 5. It was also my response to seeing so many companies here complaining about the lack of Perl developers, forcing them to use other languages even when Perl would be the best alternative for them.<br /><br />And what a huge success it was!<br /><br />The course was given by <a href="http://brunobuss.wordpress.com/">Bruno Buss</a> and myself, with me doing the talk and him preparing and giving exercises to the students and helping them with their code. At first we were hoping to get about 10 students interested, specially since we didn't have time to advertise the summer class at all. In fact, due to uncontrollable events, we could only confirm it and open registration two weeks before the class itself started. Even so, we decided to carry on with it. Later that night I got a message from Buss: <span style="font-style: italic;">"we're gonna need a bigger room"</span>.<br /><br />Turns out that in less than 24 hours we already had over 25 undergrad students registered for the course! We kept registration open as a waiting list, since we couldn't find an available lab with more than 25 PCs in such a short timeframe. A day before the beginning of the class there were <span style="font-weight: bold;">over 50 students</span> applying for a spot, even though they already <span style="font-weight: bold;">knew</span> the class was full!<br /><br />And this is Perl competing against student vacations, during summer, in Rio.<br /><br />The course was one week long, from 1pm to 5pm (yes, we had to compensate $dayjob during nighttime, but it was well worth it). Slides for all 5 days are available. It's mostly Perl, with a little Portuguese here and there like variable names, values and complementary information whenever necessary. Here's what we covered:<br /><br /><ul><li><span style="font-style: italic;">Day 1 (</span><a style="font-style: italic;" href="http://www.slideshare.net/garux/perl-moderno-dia1">slides</a><span style="font-style: italic;">) -</span> What's Perl all about; how to use <a href="http://perldoc.perl.org/">perldoc</a>; the modern and safe header (use 5.12.3; use warnings); basic I/O; scalar variables; manipulating numbers and strings; conditionals; loops; and file I/O, with <a href="http://search.cpan.org/perldoc?autodie">autodie</a> to capture exceptions. We also spoke about the <a href="http://pm.org/">Perl community</a>, showed off a bit of <a href="http://padre.perlide.org/">Padre, the Perl IDE</a>, and encouraged students to use <a href="http://modernperlbooks.com/">chromatic</a>'s brilliant "Modern Perl" <a href="http://www.onyxneon.com/books/modern_perl/">book</a> as reference material.<br /></li></ul><ul><li><span style="font-style: italic;">Day 2 (</span><a style="font-style: italic;" href="http://www.slideshare.net/garux/perl-moderno-dia2">slides</a><span style="font-style: italic;">) -</span> Running external programs; arrays (and how to manipulate them); hashes (and how to manipulate them); scalar x list x void context. That, and lots of exercises to fixate what they learned so far.<br /></li></ul><ul><li><span style="font-style: italic;">Day 3 (</span><a style="font-style: italic;" href="http://www.slideshare.net/garux/perl-moderno-dia3">slides</a><span style="font-style: italic;">) -</span> References; building complex data structures; functions (subroutines); stack traces with <a href="http://search.cpan.org/perldoc?carp">Carp</a> and <a href="http://search.cpan.org/perldoc?Carp::Always">Carp::Always</a>; and retrieving command line arguments with <a href="http://search.cpan.org/perldoc?Getopt::Long">Getopt::Long</a>. While explaining anonymous subs we also mentioned/demonstrated closures and state variables, but didn't really get into it as it was a beginners class. The day ended with an explanation of Perl's sweetheart, the <a href="http://search.cpan.org/">CPAN</a>. We showed students not only how to install modules (with <a href="http://search.cpan.org/perldoc?local::lib">local::lib</a>), but included an explanation of the full CPAN stack, including <a href="http://search.metacpan.org/">web search</a>, CPAN <a href="http://static.cpantesters.org/">Testers</a>, <a href="http://deps.cpantesters.org/">Deps</a>, <a href="http://cpanratings.perl.org/">Ratings</a> and <a href="https://rt.cpan.org/">Bug/Request Tracking</a>. We also discussed how to exploit those features (and other common tips) to pick a good module (and, of course, <a href="http://search.cpan.org/perldoc?Task::Kensho">Task::Kensho</a>).</li></ul><ul><li><span style="font-style: italic;">Day 4 (</span><a style="font-style: italic;" href="http://www.slideshare.net/garux/perl-moderno-dia4">slides</a><span style="font-style: italic;">) -</span> Regular expessions; how to create modules and <a href="http://search.cpan.org/perldoc?Exporter">export</a> functions; and more CPAN goodies, including <a href="http://search.cpan.org/perldoc?Capture::Tiny">Capture::Tiny</a> to properly retrieve the output of external programs (and pretty much everything else); <a href="http://search.cpan.org/perldoc?Try::Tiny">Try::Tiny</a> to capture exceptions; <a href="http://search.cpan.org/perldoc?DateTime">DateTime</a> to handle, well, dates and times; <a href="http://search.cpan.org/perldoc?Path::Class">Path::Class</a> to manipulate files and dirs; <a href="http://search.cpan.org/perldoc?Config::Any">Config::Any</a> and <a href="http://search.cpan.org/perldoc?Log::Log4perl">Log::Log4perl</a>.</li></ul><ul><li><span style="font-style: italic;">Day 5 (</span><a style="font-style: italic;" href="http://www.slideshare.net/garux/perl-moderno-dia-5">slides</a><span style="font-style: italic;">) -</span> <a href="http://perldoc.perl.org/perlpod.html">Plain old documentation</a>; writing <a href="http://search.cpan.org/perldoc?Test::More">tests</a>; <a href="http://perlcritic.com/">Perl Critic</a>; <a href="http://search.cpan.org/perldoc?Perl::Tidy">Perl Tidy</a>; Object Orientation (<a href="http://search.cpan.org/perldoc?Moose">Moose</a> only, including meta - I only mentioned bless as a curiosity, while explaining what happens under the hood); databases (nothing fancy, just plain <a href="http://search.cpan.org/perldoc?DBI">DBI</a> with a strong encouragement towards ORMs like <a href="http://search.cpan.org/perldoc?DBIx::Class">DBIx::Class</a>, <a href="http://search.cpan.org/perldoc?Rose::DB::Object">Rose::DB::Object</a><a href="http://search.cpan.org/perldoc?Fey::ORM">Fey::ORM</a>); Web Crawling with <a href="http://search.cpan.org/perldoc?WWW::Mechanize">WWW::Mechanize</a> and <a href="http://search.cpan.org/perldoc?Mojo::Client">Mojo::Client</a>; and Web development with <a href="http://mojolicio.us/">Mojolicious::Lite</a>, while also heavily encouraging them to try out <a href="http://catalystframework.org/">Catalyst</a> in their own time.</li></ul><br />Students were mostly from Computer Science, with around 6 of them being from Biology/Biophysics/Bioinformatics, and one or two from Electric Engineering and Applied Mathematics. In the end, there were 27 undergrads. Yes, 27. It was very rewarding to see 2 booted students showing up anyway, with their laptops, asking if they could sit on the back and participate. Of course they could :)garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com16tag:blogger.com,1999:blog-7734799596325955005.post-27231977140422491552010-12-27T07:01:00.002-02:002010-12-27T16:48:11.831-02:00A 2010 filled with Perls2010 is almost over, and I figured it's time for a retrospective of yet another awesome year for the Perl programming language and its worldwide communities. I tried making this list as complete as possible, but it's of course my own point of view, so feel free to add anything you feel I've missed on the comments below, or in your own blog post.<br /><div><br />So, without further ado, here are (my) highlights of the Perl world in 2010!<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >January</span><br /><br />The year started with <a href="http://www.perloasis.info/opw2010">Perl Oasis</a>, the traditional conference in Florida, USA, in a full day packed with great talks!<br /><br />The <a href="http://2010.perlbulgaria.org/">Bulgarian Perl Workshop</a> in Sofia also had some very nice practical talks about modern Perl topics.<br /><br />Viacheslav Tykhanovskyi released <a href="http://search.cpan.org/perldoc?Text::Haml">Text::Haml</a>, a Perl renderer for the increasingly popular <a href="http://haml-lang.com/">Haml templates</a> born in the Ruby/Rails world. The popularity is spreading fast, and there are already views for it in <a href="http://search.cpan.org/perldoc?Catalyst::View::Haml">Catalyst</a>, <a href="http://search.cpan.org/dist/MojoX-Renderer-Haml/">Mojolicious</a> and <a href="http://search.cpan.org/perldoc?Dancer::Template::Haml">Dancer</a>.<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >February</span><br /><br /><a href="http://www.frozen-perl.org/mpw2010/">Frozen Perl</a>, a three-day event in Minnesota, USA, this year also had two Perl classes and a hackathon. Very nice!<br /><br />On the other side of the world, the <a href="http://2010.perlrussia.org/perlburg">Perlburg Workshop</a> in Yekaterinburg, Russia, was also packed with talks on several modern Perl topics.<br /><br />The first version of <a href="http://search.cpan.org/perldoc?perlbrew">perlbrew</a> was released! What an amazing tool by Kang-min Liu, letting you manage several different perl installations in your home dir. Feels like forever, right?<br /><br />How about <a href="http://search.cpan.org/perldoc?cpanm">cpanm</a>, yet another incredible miyagawa-ware, proving to be an excellent lightweight alternative for installing Perl modules. It also made its debut to CPAN in February, and now you can even do <span style="font-size:85%;"><span style="font-style: italic;font-family:courier new;" >curl -L http://cpanmin.us | perl - $MODULE</span></span>. Soo sexy!<br /><br />Tools like these two and <a href="http://search.cpan.org/perldoc?local::lib">local::lib</a> make us wonder how did we live before them :-)<br /><br />In fact, speaking of Miyagawa, man was he on fire or what this month?! February also marked the release of <a href="http://search.cpan.org/perldoc?Starman">Starman</a>, a high-performance preforking PSGI/Plack web server. It fits so nicely it's now used in production everywhere.<br /></div><br /><div>Last but most certainly not least, David Mitchell <a href="http://news.perlfoundation.org/2010/02/grant-proposal-fixing-perl5-co.html">submitted a grant </a>proposal to <a href="http://perlfoundation.org/">The Perl Foundation</a>, to fix bugs in core Perl 5. It was a huge success, and over the year he worked for more than 500 hours and closed 127(!!) tickets.<br /></div><br /><div><br /><span style="font-weight: bold;font-size:130%;" >March</span><br /><br />The <a href="http://conferences.yapceurope.org/hack2010dk/">Perl 6 Hackathon</a> in Copenhagen, Denmark, raised <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU4hmjVDcjom_d98TeeN4Z1RbUkOliXbAamSjGDoI8eIkoUP5Vohlb6FwXmDThKqOpVHZm7pdSsF1fMYCosnVzx8vPS0FXF68b4jgKbpwVNxWfoytwFIA-6NyGq9F9aPwAth9QhApvEeLq/s1600/camelia-logo-small.png"><img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 120px; height: 111px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU4hmjVDcjom_d98TeeN4Z1RbUkOliXbAamSjGDoI8eIkoUP5Vohlb6FwXmDThKqOpVHZm7pdSsF1fMYCosnVzx8vPS0FXF68b4jgKbpwVNxWfoytwFIA-6NyGq9F9aPwAth9QhApvEeLq/s200/camelia-logo-small.png" alt="" id="BLOGGER_PHOTO_ID_5555069484824476642" border="0" /></a>a lot of awareness around <a href="http://perl6.org/">Perl 6</a>, showed practical examples and offered a hands-on experience to all attendants.<br /><br />Perl also made a huge appearance in Germany at <a href="http://www.cebit.de/">CeBIT</a>, the world's largest computer expo, showcasing modern Perl solutions like <a href="http://www.iinteractive.com/moose/">Moose</a>, <a href="http://www.catalystframework.org/">Catalyst</a> and <a href="http://search.cpan.org/perldoc?DBIx::Class">DBIx::Class</a> to over 8000 individual developers and companies from all around the globe, not to mention products such as <a href="http://foswiki.org/">Foswiki</a>, and <a href="http://otrs.org/">OTRS</a>. Nice marketing, <a href="http://search.cpan.org/perldoc?Perl::Staff">Perl::Staff</a>! :-)<br /><br /><a href="http://www.iinteractive.com/moose/">Moose</a> 1.0 was released to the world! Now, I know Moose has been stable and production ready for a few years now, being the <span style="font-style: italic;">de-facto</span> way to create and manipulate objects in modern Perl, and the only reason 1.0 was released was because they ran out of two-digit numbers. Either way, it looks nice and might make some enterprise people subconsciously more comfortable using it ;-)<br /><br />March is the month of the first Equinox of the year, and the São Paulo Perl Mongers in Brazil celebrated the date with a <a href="http://sao-paulo.pm.org/artigos">calendar</a> of Perl articles in portuguese, contributed by developers all over the country, just like the traditional advent calendars in december.<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >April</span><br /><br /><a href="http://www.perl.org/get.html">Perl 5 release 12</a> was finally out of the oven! And what a great improvement it was, with default strictness, Unicode overhaul, Y2038 compliance, pluggable keywords, and much more!<br /><br />The <a href="http://2010.qa-hackathon.org/qa2010/wiki">Perl QA Hackathon</a> in Vienna, Austria, gathered around 30 people in 3 full days of intense (and happy!) hacking, culminating in several improvements on the already great Quality Assurance tools for Perl, including <a href="http://search.cpan.org/perldoc?Devel::Cover">Devel::Cover</a>, <a href="http://search.cpan.org/perldoc?Test::Smoke">Test::Smoke</a> and <a href="http://search.cpan.org/perldoc?Test::Harness">Test::Harness</a>.<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig__-ly_zGj0N8Y36F_-T5TI0xdxoabvDfJ1nZhYYp9_tjPqJAYDqfJj2tHkJTwalVvnRJzRTzr8jw2FS_Wo7W0huVFuUwVzAZXhUGoSM8_3aMYWa-G7mNleiz0nGc0gxsiTNOuSSmi_9t/s1600/Buggie_new.png"><img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 95px; height: 125px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig__-ly_zGj0N8Y36F_-T5TI0xdxoabvDfJ1nZhYYp9_tjPqJAYDqfJj2tHkJTwalVvnRJzRTzr8jw2FS_Wo7W0huVFuUwVzAZXhUGoSM8_3aMYWa-G7mNleiz0nGc0gxsiTNOuSSmi_9t/s200/Buggie_new.png" alt="" id="BLOGGER_PHOTO_ID_5555212649396833234" border="0" /></a><br /><br /><a href="http://www.bugzilla.org/">Bugzilla</a> 3.6 was released, offering exciting new features for users and administrators, including migration tools, a simple "Browse" interface, lots of usability improvements and <a href="https://wiki.mozilla.org/Bugzilla:Addons#Bugzilla_Extensions">drop-in extensions</a>.<br /><br />Josheph Hall and brian d foy did it again, and the second edition of Effective Perl Programming is better than ever, showing real problems and real solutions, just like the <a href="http://www.effectiveperlprogramming.com/">companion website</a>. What are you waiting for, go <a href="http://www.amazon.com/gp/product/0977920151?ie=UTF8&tag=onyneopre-20">get it now</a>!<br /><br />The <a href="http://xslate.org/">unbelievably fast Text::Xslate</a> templating system by Goro Fuji was released on an unsuspecting world. It's up to 158X faster (!!) than everyone's favorite <a href="http://template-toolkit.org/">Template::Toolkit</a>, and provides a compatibility layer letting you use <a href="http://search.cpan.org/perldoc?Text::Xslate::Syntax::TTerse">TT2's syntax</a> and <a href="http://search.cpan.org/perldoc?Text::Xslate::Bridge::TT2Like">virtual methods</a> if you want. Also, there are already views available for your <a href="http://search.cpan.org/perldoc?Catalyst::View::Xslate">Catalyst</a>, <a href="http://search.cpan.org/perldoc?Mojolicious::Plugin::Xslate">Mojolicious</a> and <a href="http://search.cpan.org/perldoc?Dancer::Template::Xslate">Dancer</a> web apps.<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >May</span><br /><br /><a href="http://devconf.ru/">DevConf</a>, a major conference in Russia gathering over a thousand professional web developers, had a <a href="http://devconf.ru/perl">full track just for Perl</a>!. And of course, the Russian Perl Community was amazing as usual and provided several nice talks for <a href="http://devconf.ru/perl">DevConf::Perl</a>.<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >June</span><br /><br />Wow, this month was filled with Perl conferences! <a href="http://workshop.perl.pt/ptpw2010/">Portuguese Perl Workshop</a>, <a href="http://conferences.yapceurope.org/gpw2010/">German Perl Workshop</a>, <a href="http://www.perlworkshop.be/bpw2010/">Belgian Perl Workshop</a>, each of them filled with nice talks and courses.<br /><br /><a href="http://social.yapcrussia.org/yr2010/">YAPC::Russia</a> this year happened in Kiev together with Perl Mova, the Ukrainian Perl Workshop, and was another huge success.<br /><br />And speaking of huge successes, June is not over until after <a href="http://yapc2010.com/">YAPC::NA</a>. The greatest Perl conference in the Americas happened for a full week in Ohio, USA, and had over 130 talks!<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >July</span><br /><br />Following the mid-year sprint of Perl events, we also had the São Paulo Perl Workshop in Brazil, and the <a href="http://warszawa.linux.org.pl/">Warsaw Perl Workshop</a> in Poland.<br /><br /><a href="http://rakudo.org/">Rakudo Star</a> was released! It's a useful - and usable! - implementation of the Perl 6 language specification.<br /><br />Goro Fuji released the first version of <a href="http://search.cpan.org/perldoc?Text::Clevery">Text::Clevery</a>, a Text::Xslate subclass allowing developers using <a href="http://www.smarty.net/">PHP's Smarty</a> template syntax.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHGl_w6xh82g3vIK_r8smNQs0pyKyTjOgMnHNNhr9bovFosyCRqRlBFcDqg0RIL7mkyxKGi2VlT-Doh-J4NYE8Wr_24EOlaKISYlPR1VgkMLV2ttErsUBnKFJaidk-fIkOprWSe3lacxt4/s1600/Duck.duck.go.png"><img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 107px; height: 104px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHGl_w6xh82g3vIK_r8smNQs0pyKyTjOgMnHNNhr9bovFosyCRqRlBFcDqg0RIL7mkyxKGi2VlT-Doh-J4NYE8Wr_24EOlaKISYlPR1VgkMLV2ttErsUBnKFJaidk-fIkOprWSe3lacxt4/s200/Duck.duck.go.png" alt="" id="BLOGGER_PHOTO_ID_5555213655051687122" border="0" /></a><br />Gabriel Weinberg released DuckDuckGo's <a href="http://duck.co/">community website</a>. I already <a href="http://onionstand.blogspot.com/2010/07/duckduckgo-fast-and-awesome-web-search.html">wrote</a> a bit about the amazing (and amazingly fast) <a href="http://duckduckgo.com/">DuckDuckGo search engine</a>, and if you never used it, now is the perfect time. But beware: you might never return to Google search. I know I haven't ;-)<br /><br />July also marked the second birthday of <a href="http://padre.perlide.org/">Padre, the Perl IDE</a>. For a whole weekend, Padre developers, users, friends and well-wishers joined a huge party and hackathon.<br /><br /><a href="http://softwarelivre.org/fisl11">FISL 11</a>, the largest opensource event in Latin America, gathered over 7000 developers, enthusiasts and companies in Porto Alegre, Brazil. We had a very busy Perl stand there, and made a contest on the conference's big screen of an <a href="http://search.cpan.org/perldoc?Games::Zumbis">arcade zombie game</a> developed live during the conference using SDL Perl. It was lots of fun!<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >August</span><br /><br /><a href="http://conferences.yapceurope.org/ye2010/">YAPC::EU</a>, <span style="font-style: italic;">"The Renaissance of Perl"</span>, joined Perl developers from all over the world in Pisa, Italy, with over 100 amazing talks and 14 tracks! They even had a <a href="http://conferences.yapceurope.org/ye2010/news/639">cooking contest</a> after the conference =P<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >September</span><br /><br /><a href="http://blogs.perl.org/users/jt_smith/">JT Smith</a> and crew released <a href="http://www.lacunaexpanse.com/">Lacuna Expanse</a>, a highly addictive free massive multiplayer online (MMO) deep space empire strategy simulator (phew!) written in Modern Perl. It also has a public API, and people even hacked a new <a href="https://github.com/tsee/Games-Lacuna-Client">client for automated tasks</a>. If you haven't played it yet, do it. Now. It's even integrated to Facebook, so if you have an account there, you don't even need to create a login.<br /><br />Speaking of games, <a href="https://github.com/PerlGameDev/SDL_Manual">SDL Manual</a> was started by Kartik Thakore in yet another grant by The Perl Foundation. It's not done yet, but it's the first real documentation of the new API, and already contains tons of code examples and complete game tutorials in Perl.<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >October</span><br /><br />This month we had not one, but two other YAPCs!<br /><br />The ever great <a href="http://yapcasia.org/2010/">YAPC::Asia</a> in Tokyo went along for 3 days filled with the most awesome talks, and broke a new record: over 500 attendants!! How cool is that?!<br /><br />On the other side of the world, <a href="http://www.yapcbrasil.org.br/2010/">YAPC::Brazil</a> made its second appearance as a standalone conference in the beautiful city of Fortaleza, with around 100 of people attending online and on-site.<br /><br />The <a href="http://search.cpan.org/perldoc?Facebook">Facebook SDK distribution</a> was revived by Torsten Raudssus, giving a better overview on how to dive into the Facebook platform using the long existing modules to access the Facebook API via <a href="http://search.cpan.org/perldoc?Facebook::Graph">Graph</a> or <a href="http://search.cpan.org/perldoc?WWW::Facebook::API">REST</a>. Many Perl developers are active in social networks (<a href="http://search.cpan.org/perldoc?Net::Twitter">writing robots for Twitter</a> is a real breeze with modern Perl), so if you missed it now is the perfect time to get on board ;)<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >November</span><br /><br />The <a href="http://www.blekko.com/">Blekko search engine</a> was released, offering a neat <span style="font-style: italic;">/slashtag</span> syntax that lets you get the most relevant results in a heartbeat. It's great to see so many new companies relying on modern Perl for their core businesses. Give it a try, and slash the web!<br /><br />Following the events calendar, the <a href="http://2010.useperl.at/apw2010/">Austrian Perl Workshop</a> opened<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHyXUkwM37iPFLAIiCpBdW0M1_WSzT_VQ3Y1zeDbNXCgT2Kp4yhnTe5eObJZTn9YEojFOgqgcP6sCtw2iFYTg3kIhTq4i0Mit349BYTaDw_OVErxI6jbFDdTjo6IuTTKFsueyTjmJX9fWJ/s1600/npw.png"><img style="margin: 0pt 0pt 10px 10px; width: 124px; float: right; height: 165px; cursor: pointer;" id="BLOGGER_PHOTO_ID_5551712789758255458" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHyXUkwM37iPFLAIiCpBdW0M1_WSzT_VQ3Y1zeDbNXCgT2Kp4yhnTe5eObJZTn9YEojFOgqgcP6sCtw2iFYTg3kIhTq4i0Mit349BYTaDw_OVErxI6jbFDdTjo6IuTTKFsueyTjmJX9fWJ/s400/npw.png" border="0" /></a> november with a 2-day conference filled with great talks.<br /><br />There was also <a href="http://conferences.yapceurope.org/npw2010/">Nordic Perl Workshop</a>, organized by the Icelandic Society For Digital Freedoms in Reykjavik. It's the first time the NPW is held in Iceland, proving that <a href="https://secure.wikimedia.org/wikipedia/en/wiki/2010_eruptions_of_Eyjafjallaj%C3%B6kull">volcanic eruptions</a> may shut down an entire continent's airspace, but the camels will just keep strolling like it's a morning fog ;-)<br /><br />With the second Equinox of the year, the São Paulo Perl Mongers arranged another sprint of modern Perl articles in portuguese, written by the entire Brazilian community.<br /><br />Finally, after a lot of expectation from the worldwide Perl community, chromatic's <a href="http://www.onyxneon.com/books/modern_perl/index.html">Modern Perl book</a> was finally out! As far as I can tell it's the best reference for modern Perl coding today, and an excellent read. I honestly think it's an amazing learning and reference material, and might prove insightful even to the most seasoned programmer. So <a href="http://www.amazon.com/gp/product/0977920151?ie=UTF8&tag=onyneopre-20">go buy it now</a>!<br /><br /><br /><span style="font-weight: bold;font-size:130%;" >December</span><br /><br />The always amazing <a href="http://conferences.yapceurope.org/lpw2010/">London Perl Workshop</a> happened on the 4th and proved once again to be an enormous success, including a talk by Spiros Denaxas about how Perl was used in medical research and epidemiology to help cure coronary heart disease.<br /><br />On the 18th - <a href="http://perl.org/">Perl</a>'s birthday! - there was the <a href="http://event.perlrussia.org/saintperl2/">Sixth Russian Perl Workshop, Saint Perl 2</a>, in the lovely St. Petersburg, also filled with talks in Russian and English for all audiences, for free.</div><br /><div><a href="https://github.com/cog/perlbaldoc/">Perlbal::Manual</a>, a complete manual for the highly used <a href="http://www.danga.com/perlbal/">Perlbal reverse proxy and load balancer</a>, was published by Bruno Martins and José Castro. Yay!</div><br /><div><a href="http://search.cpan.org/perldoc?Mojolicious">Mojolicious</a> 1.0 was finally released, and it really makes web development fun - specially <a href="http://search.cpan.org/perldoc?Mojolicious::Lite">Mojolicious::Lite</a>!<br /><br />Speaking of fun lite web frameworks, the <a href="http://advent.perldancer.org/2010">Dancer Advent Calendar</a> made its debut this year, with several articles teaching you how to do things with <a href="http://search.cpan.org/perldoc?Dancer">Dancer</a>, from testing and managing database connections to creating a tiny blog!<br /><br />All other already traditional <a href="http://www.perladvent.org/2010/">Perl</a>, <a href="http://perl6advent.wordpress.com/">Perl6</a>, <a href="http://www.catalystframework.org/calendar/2010">Catalyst</a>, <a href="http://advent.rjbs.manxome.org/2010/">RJBS</a>'s, and <a href="http://perl-users.jp/articles/advent-calendar/2010/">JPerl</a> Advent Calendars are most definitively praise-worthy and were responsible for over 300(!!) new articles on Perl and its modules, with tons of awesome tips and cookbooks <span style="font-weight: bold;">this month only</span>! In fact, the Japanese Perl community is so freaking amazing they had 8 (that's right, EIGHT) tracks on their Advent Calendar, so JPerl alone was responsible for 200 articles this month. <span style="font-size:78%;">すごい!!</span><br /><br /><br />Wow, so much in just a year! I can't even begin to imagine all the wonderful things that are going to pop up in 2011!<br /><br />See you there :-)<br /></div>garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com11tag:blogger.com,1999:blog-7734799596325955005.post-27329636631411306742010-10-06T17:38:00.001-03:002010-10-06T17:38:14.252-03:00Perl and Online CommunitiesToday, the ever amazing <a href="http://xkcd.com/">xkcd</a> released a new <a href="http://xkcd.com/802/">map of online communities</a>. Until last year or so, most of the Perl community resided on "email land". Granted, it's a huge place, but not so pretty, and foreigners probably needed a visa to enter - or at least someone inside to give you <a href="http://lists.perl.org/">directions</a> and keep you <a href="http://catb.org/%7Eesr/faqs/smart-questions.html">out of trouble</a>. Oh, we also have our cozy and warm "<a href="http://www.irc.perl.org/">irc isles</a>", but let's face it: it's not that big an empire.<br /><br />Then the <a href="http://ironman.enlightenedperl.org/">Ironman Challenge</a> came, and people followed. Or, rather, blogged. And what a great thing it is! Our brave explores went out of their comfort zones and right into the blogosphere core, planting the camel flag and claiming more ground for Perl.<br /><br />Lots of us also settled on the huge <a href="http://twitter.com/#search?q=%23perl">Twitter continent</a>, showcasing Perl to contacts and followers. Others have decided to head north and are now bravely fighting the flames of <a href="http://www.reddit.com/">Reddit</a>, <a href="http://digg.com">Digg</a> and several other web forums, getting more and more Perl news out of the annoying old myths and into the <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Slashdot_effect">Slashdot effect</a> - and what a nice bootstrapping this is, being that <a href="http://slashdot.org/">Slashdot</a> itself is <a href="http://www.slashcode.com/">written in Perl</a>!<br /><br />What lies ahead? Right now, the great (and greatly addictive) <a href="http://lacunaexpanse.com">Lacuna Expanse</a> game is taking Modern Perl straight right into the "MMO Isle", where I'm sure very nice things await. It's the new land of opportunity for Perl apps. And it's already integrated to <a href="http://www.facebook.com/pages/perl/16665510298">Facebook</a>, another promising shore for the Perl programming language and its ever growing community.<br /><br />Now if you excuse me, I have a Spy Pod waiting to be launched against the evil Perigrin's Estate. Erm, I mean... work, yeah. ;-)garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com1tag:blogger.com,1999:blog-7734799596325955005.post-54078744039577846492010-10-06T13:39:00.001-03:002010-10-06T13:39:00.797-03:00One Click Installers for Perl Web Apps on DreamhostLove it or hate it, <a href="http://www.dreamhost.com/">Dreamhost</a> is one of the most popular web hosting services out there. One of the reasons is their one-click install feature, letting people install opensource software for their web publishing needs like <a href="http://wordpress.org/">Wordpress</a>, <a href="http://www.mediawiki.org/wiki/MediaWiki">MediaWiki</a>, <a href="http://trac.edgewall.org/">Trac</a>, <a href="http://drupal.org/">Drupal</a> and <a href="http://wiki.dreamhost.com/Available_One_Click_Installs">several others</a>, automatically.<br /><br />Now it's our chance to add some Perl apps there too! If you are part of an app's community, Dreamhost created a <a href="http://www.dreamhost.com/hosting-oneclick-installer-submitter.cgi">"One-click installer" submitter form for developers</a>, where you can add your app up for evaluation. In their own words, it's <span style="font-style: italic;">"a unique chance to get some great exposure; thousands of DreamHost customers would see it every day!"</span><br /><br />How about it, then? <a href="http://movabletype.org/">MovableType</a>? <a href="http://openmelody.org/">Melody</a>? <a href="http://mojomojo.org/">MojoMojo</a>? From what I can tell, everyone is welcome - just fill the form (you will need to provide a contact email) and cross your fingers :)<br /><br />And if you really want to get to them, it appears they are starting an experimental program with all the developers using Dreamhost. Just sign in their <a href="http://developer.dreamhost.com/">developer mailing list</a>.<br /><br />What I would really want to see from Dreamhost is <a href="http://www.catalystframework.org/">Catalyst</a> already installed - or at least a lighter/simpler framework like <a href="http://mojolicious.org/">Mojolicious/Mojolicious::Lite</a> or <a href="http://perldancer.org/">Dancer</a>. They already come with <a href="http://wiki.dreamhost.com/Ruby_on_Rails">Rails support</a>, so why not Perl as well? Spread the word, let's make some noise! :Dgaruhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com5tag:blogger.com,1999:blog-7734799596325955005.post-73642669344779607112010-08-01T22:25:00.000-03:002010-08-01T22:25:01.012-03:00Bringing Worldwide Perl Communities TogetherA couple of weeks ago I had this very nice talk with <a href="http://blog.perlassociation.org/">Daisuke Maki</a>, <a href="http://szabgab.com/">Gábor Szabó</a> and <a href="http://search.cpan.org/~ishigaki/">Kenichi Ishigaki</a> about Perl communities worldwide. These days, as once was with french, and german, and latin, if you want to be heard in a wider audience, you have to speak (or, in this case, write) in english.<div><br /></div><div>But what goes around in english doesn't necessarily reflect what's actually happening worldwide. Wikipedia estimates only 400 million people having english as their first language, and something between 500 million to 1.8 billion speakers overall. In a world of little less than 7 billion people, you can see how a lot of information may be lost.</div><div><br /></div><div>In fact, as Ishigaki-san pointed out, a lot happens where most of the non-speakers don't know. This is true for both the japanese and brazilian communities, and I'm pretty sure it is also true for a lot of other communities where the native language is not english. It's not some bizarre sort of protectionism or xenophobia; there is just too much going on with too few having/taking the time to show them off to the unsuspecting, english-speaking, world.</div><div><br /></div><div>Not that everyone would care, of course. But some might (I know I do, and Gábor does, too). Besides, as Maki-san mentioned, it might be interesting not to be completely clueless about what happens in other communities, even if some of those things are too regional to be useful outside the local <a href="http://pm.org/">Perl Monger</a> group. </div><div><br /></div><div>While events such as the imminent <a href="http://conferences.yapceurope.org/ye2010/">YAPC::EU</a>, are an awesome opportunity to hear about what's going on with several different Perl groups, a lot of us can't make it to Europe, and the language barrier still poses an issue.</div><div><br /></div><div>Some movement is already there to achieve this sort of integration and spread the Perl word across idiom barriers. <a href="http://www.fayland.org/">Fayland</a> wrote and uploaded to CPAN a <a href="http://search.cpan.org/perldoc?Book::Chinese::MasterPerlToday">Perl Book in Chinese</a>, so Perl would easier reach the Chinese Community. I believe <a href="http://sartak.org/">Shawn Moore</a>'s <a href="http://cpanratings.perl.org/dist/Book-Chinese-MasterPerlToday">comment in that module's ratings</a> goes a long way. Speaking of Chinese Community, did you know last year they even made a Perl <a href="http://perlchina.org/advent/">Advent Calendar</a>?</div><div><br /></div><div>There's also an ongoing attempt to <a href="http://perldoc.org/">translate documentation</a> and make <a href="http://search.cpan.org/perldoc?POD2::Base">perldoc aware of localization</a>. Translations in <a href="http://search.cpan.org/perldoc?POD2::FR">French</a>, <a href="http://search.cpan.org/perldoc?POD2::IT">Italian</a>, <a href="http://search.cpan.org/perldoc?POD2::LT">Lithuan</a>, and <a href="http://search.cpan.org/perldoc?POD2::PT_BR">Brazilian Portuguese</a> are already on CPAN. And Ishigaki's <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors">Acme::CPANAuthors</a> quickly became a huge success - I'm actually proud of being one of the early adopters - offering a way for <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Japanese">Japanese</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Brazilian">Brazilian</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Russian">Russian</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Ukrainian">Ukrainian</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::British">British</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Icelandic">Icelandic</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Norwegian">Norwegian</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::French">French</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Canadian">Canadian</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Korean">Korean</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Italian">Italian</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Taiwanese">Taiwanese</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Turkish">Turkish</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Portuguese">Portuguese</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Israeli">Israeli</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Indonesian">Indonesian</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::German">German</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Dutch">Dutch</a>, <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Chinese">Chinese</a>, and <a href="http://search.cpan.org/perldoc?Acme::CPANAuthors::Austrian">Austrian</a> authors to know a bit more about each other. And I'm sure more are on their way!</div><div><br /></div><div>So, just as I often try to make people here in Brazil aware of what's going on in the worldwide Perl community, in the next few posts I'll take some time to go the other way around, and broadcast a little of what's going on in these parts to whomever is listening.</div><div><br /></div><div>I'd also really like to know more about <b>*your*</b> local Perl Mongers group. After all, we do speak the same language, and that is Perl ;-)</div><div><br /></div><div>So, what have you guys been up to?</div>garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com2tag:blogger.com,1999:blog-7734799596325955005.post-15044357012124934052010-07-27T16:53:00.001-03:002010-07-27T16:53:23.558-03:00DuckDuckGo, a *fast* and *awesome* web search engine (in Perl!)<div>More than often we hear people in the Perl community asking for more Perl applications and solutions instead of just modules. Well, <a href="http://www.gabrielweinberg.com/">Gabriel Weinberg</a> (<a href="http://search.cpan.org/~yegg/">YEGG</a>, on CPAN) did just that!</div><div><br /></div><div>His new creation is called DuckDuckGo (DDG for short), a search engine with lots of cool features, like:</div><div><br /></div><div><ul><li><b>It's blazing fast!</b> Google's search results doesn't quite make it for me, but I could get to the "right" result in the list (even in other pages) really fast, so is was one of the biggest blockers for me in switching to other engines. No more :-)<br /><br /></li><li><b>Official sites</b> are labelled and displayed on top.<br /><br /></li><li><b>No ads above results, and actual privacy!</b> Unlike Google, DDG does not track users, nor displays "sponsored links" on top of your search.<br /><br /></li><li><b>Zero-click info</b> is an amazing way to find what you're looking for in your search without having to follow any links. Let DDG do the hard work for you!<br /><br /></li><li><b>Several goodies ready for you</b>: go to the first result prepending a "!" to your search, find your IP address by simply querying "ip", get random numbers, test a regexp, and <a href="http://duckduckgo.com/goodies.html">much, much more</a>!<br /><br /></li><li><b>site:, filetype:, inurl:, AND, OR</b>, and all your favorite advanced operators work too!<br /><br /></li><li><b>Keyboard shortcuts and customizations</b> let you setup fonts, colors and much more! If you don't like to use the mouse, you can do everything via the keyboard.<br /><br /></li><li><b>Encrypted search</b>, just use https:// instead of http://</li></ul></div><div>Read the <a href="http://duckduckgo.com/about.html">About</a> and <a href="http://duckduckgo.com/faq.html">FAQ</a> for more features and information, and <a href="http://dukgo.com/">give it a try</a>. You might be surprised :-)</div><div><br /></div>Want to help promote more Perl-based solutions? Sick and tired of Google search? Switch now!<div><br /></div><div><a href="http://dukgo.com/">http://dukgo.com</a></div><div><a href="http://duckduckgo.com/">http://duckduckgo.com</a></div><div><br /></div><div>Oh, did I mention it is <b>**fast**</b> ??</div><div><br /></div><div>Cheers!</div>garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com12tag:blogger.com,1999:blog-7734799596325955005.post-14815038474505687612010-06-14T17:54:00.000-03:002010-06-14T17:55:33.244-03:00Tweetylicious - a Twitter-like microblogging app in just one file!<div style="text-align: left;"><span class="Apple-style-span" style=" ;font-family:Verdana, sans-serif;">So, I've been playing a little with <a href="http://search.cpan.org/perldoc?Mojolicious::Lite">Mojolicious::Lite</a>, and here's what I came up with :-)</span></div><span class="Apple-style-span" style=" ;font-family:Verdana, sans-serif;font-size:medium;"><p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0U9wUdUMXigwm-tcMIZDEUH0kYNXyjMXddXX0IXjTOUJ4vX3otWHE7ycmW-zW-lpiKgQcgNz4kg8J4qmj-eX09OR8BWeLy2hxvAMcNpZ2xyreijnlWxIYcxL5o2zGmLX1JgV8RoV9RATS/s400/tweetylicious.png" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 332px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5482516443863507986" /></p><p>Tweetylicious is a small - but rather complete - <a href="http://en.wikipedia.org/wiki/Micro-blogging" style="text-decoration: none; ">microblogging</a> web application in a single file! It is meant to demonstrate how easy and fun it is to create your own Web applications using <a href="http://www.perl.org/">modern Perl 5</a> and <a href="http://jquery.com/">jQuery</a>!</p><p>Some features:</p><ul style="margin-top: 10px; margin-right: auto; margin-bottom: 10px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: square; list-style-position: outside; list-style-image: initial; display: block; width: 648px; "><li style="margin-bottom: 10px; ">Multi-user, with homepages, search and list of followers/following</li><li style="margin-bottom: 10px; ">Nice, clean, pretty interface (at least I think so :P)</li><li style="margin-bottom: 10px; ">User avatar images provided by <a href="http://gravatar.com/" style="text-decoration: none; ">gravatar</a></li><li style="margin-bottom: 10px; ">Unicode support</li><li style="margin-bottom: 10px; ">Well structured, commented code, easy to expand and customize</li><li style="margin-bottom: 10px; ">Encrypted online sessions</li><li style="margin-bottom: 10px; ">Uses an actual database (SQLite) and stores encrypted user password</li></ul><div><br /></div><div>If you want it, the <a href="http://github.com/garu/tweetylicious">full code is in github</a>. Removing just blank lines and comments, the Model has ~80 lines, the Controller ~110 lines, templates ~170 lines, plus ~90 lines of static css and ~60 of static javascript. And that's the <b>whole</b> app :D</div><div><br /></div><div>How do you run it?</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"> perl tweetylicious.pl daemon</span></div><div><br /></div><div>You'll need <a href="http://search.cpan.org/perldoc?Mojolicious">Mojolicious</a> and <a href="http://search.cpan.org/perldoc?ORLite">ORLite</a> - two very lightweight modules - to run the app, and that's about it! A live Internet connection is also good, since it fetches jQuery on the fly.</div><div><br /></div><div>Mind you, it's far from perfect (<a href="http://github.com/garu/tweetylicious/issues">bug reports and patches always welcome!</a>). I wrote it as a demo to show the kind of stuff you can quickly achieve with Perl. It's totally usable and might be a good fit for quick deployment and customization on internal networks, but if you're looking for a business ready microblogging solution, you might want to look at <a href="http://status.net/">status.net</a> (which powers <a href="http://identi.ca/">identi.ca</a>). But it's waaaay bigger ;-P</div><div><br /></div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;">Tutorial...ish</span></div><div><br /></div><div>I tried making the commits linear and modular, so newcomers can take a look at git log for a "tutorial":</div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;"><br /></span></span></div><div><ol><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">initial commit - </span></span><a href="http://github.com/garu/tweetylicious/commit/95f9134b6717bbc92e89548082c424de9ca904e9#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/95f9134b6717bbc92e89548082c424de9ca904e9/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">adding index page (and route) - </span></span><a href="http://github.com/garu/tweetylicious/commit/bd85ed29aba21c70edbcd4961a036e14de13212a#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/bd85ed29aba21c70edbcd4961a036e14de13212a/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">separating common html into a shareable 'layout' - </span></span><a href="http://github.com/garu/tweetylicious/commit/63152dce6c7c1571916472cf44c9c009b15b7e7f#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/63152dce6c7c1571916472cf44c9c009b15b7e7f/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">adding (all) css - sorry, this is not a css tutorial :P - </span></span><a href="http://github.com/garu/tweetylicious/commit/66fdfb909850939705c95bbc8ca768975cfc1a6d#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/66fdfb909850939705c95bbc8ca768975cfc1a6d/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">users will need to 'login' and 'join' (register)! - </span></span><a href="http://github.com/garu/tweetylicious/commit/9e928abcb6fac99a56e0fc8c307d4d040240d841#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/9e928abcb6fac99a56e0fc8c307d4d040240d841/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">first jQuery contact: turning links into buttons - </span></span><a href="http://github.com/garu/tweetylicious/commit/7ccd87cfd88e61283128b72c4947597638640014#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/7ccd87cfd88e61283128b72c4947597638640014/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">creating the 'User' model schema in our database - </span></span><a href="http://github.com/garu/tweetylicious/raw/7ccd87cfd88e61283128b72c4947597638640014/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/57ebf27258e5404b2c0b382c3479d3f11c7e58f1/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">registering users: the template - </span></span><a href="http://github.com/garu/tweetylicious/commit/04e44bfbe45405b1be77b22d5bf6d3b2f8b4b471#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/04e44bfbe45405b1be77b22d5bf6d3b2f8b4b471/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">registering users: the controller - </span></span><a href="http://github.com/garu/tweetylicious/commit/d16efb39f9a06c1cd2321e0722ecb5ddeabcb229#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/d16efb39f9a06c1cd2321e0722ecb5ddeabcb229/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">registering users: validating registration data - </span></span><a href="http://github.com/garu/tweetylicious/commit/03d096c941553b23521038cd8fa5c6e29a840edb#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/03d096c941553b23521038cd8fa5c6e29a840edb/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">registering users: prevent usernames that are part of a route - </span></span><a href="http://github.com/garu/tweetylicious/commit/b5eede60c32b05bfa807cbf86132e97634a833f1#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/b5eede60c32b05bfa807cbf86132e97634a833f1/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">user login: the template (and basic route) - </span></span><a href="http://github.com/garu/tweetylicious/commit/f73b8f2d0452832f4cb8d206d3a7a3e05bc8faad#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/f73b8f2d0452832f4cb8d206d3a7a3e05bc8faad/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">user login: the controller (handling form submission) - </span></span><a href="http://github.com/garu/tweetylicious/commit/7035cf787a6b36c63a012e82ff0c1163a00b695c#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/7035cf787a6b36c63a012e82ff0c1163a00b695c/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">user logout: controller, and option in template - </span></span><a href="http://github.com/garu/tweetylicious/commit/9c3cee4d47f00b547ef341debf89d8f08b573264#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/9c3cee4d47f00b547ef341debf89d8f08b573264/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">the user's homepage (template) - </span></span><a href="http://github.com/garu/tweetylicious/commit/0605ef16a9ff5074e9c374995c0b314ab503f5ee#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/0605ef16a9ff5074e9c374995c0b314ab503f5ee/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">the user's homepage (controller) - </span></span><a href="http://github.com/garu/tweetylicious/commit/e59bd6f066eb564420eef71313cfc8244e8e06dd#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/e59bd6f066eb564420eef71313cfc8244e8e06dd/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">adding a 'not found' page - </span></span><a href="http://github.com/garu/tweetylicious/commit/99afc640f812560a0addb0eea4ac16e5f12dbd42#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/99afc640f812560a0addb0eea4ac16e5f12dbd42/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">making 'login' and 'join' redirect to user's homepage - </span></span><a href="http://github.com/garu/tweetylicious/commit/99b3d5377bbe4cbca2f072d1e3c7c90581ca0431#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/99b3d5377bbe4cbca2f072d1e3c7c90581ca0431/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">updating our model: posts! - </span></span><a href="http://github.com/garu/tweetylicious/commit/e03bb401fabfa72715b45e16ea61165a3c856027#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/e03bb401fabfa72715b45e16ea61165a3c856027/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">making user's homepage show posts (but user can't create them just yet - </span></span><a href="http://github.com/garu/tweetylicious/commit/31785e372749148156b30fab3580d443f49a649d#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/31785e372749148156b30fab3580d443f49a649d/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">updating our controller: creating posts - </span></span><a href="http://github.com/garu/tweetylicious/commit/76eed746264c0ebb12567213845624c9a64d2a7f#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/76eed746264c0ebb12567213845624c9a64d2a7f/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">updating our controller: deleting posts - </span></span><a href="http://github.com/garu/tweetylicious/commit/bfa937d034bd8758936fab51657d33d68fdc31e4#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/bfa937d034bd8758936fab51657d33d68fdc31e4/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">updating our controller: turning common posting auth code into a ladder - </span></span><a href="http://github.com/garu/tweetylicious/commit/bd7b55f6f4db2843cdf89ebebea13c62cca530e9#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/bd7b55f6f4db2843cdf89ebebea13c62cca530e9/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">more jQuery: styling post submit into a button too - </span></span><a href="http://github.com/garu/tweetylicious/commit/3a1051bd7e4a353a5d51af6eeb35cf9c7482f9f5#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/3a1051bd7e4a353a5d51af6eeb35cf9c7482f9f5/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">more jQuery: showing how many characters are left in a post - </span></span><a href="http://github.com/garu/tweetylicious/commit/6d280af611174e8c6de9371a90aec3e390244f2d#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/6d280af611174e8c6de9371a90aec3e390244f2d/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">more jQuery: highlighting posts on hover - </span></span><a href="http://github.com/garu/tweetylicious/commit/9d24f83512ee4fe38b5442d9aa86a152606d9648#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/9d24f83512ee4fe38b5442d9aa86a152606d9648/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">more jQuery: formatting our content for RTs (@user) - </span></span><a href="http://github.com/garu/tweetylicious/commit/d1d6d08481cd8a56b3910940492765449e6d3466#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/d1d6d08481cd8a56b3910940492765449e6d3466/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">creating posts via Ajax (rather, Ajaj, since we're using JSON ;) - </span></span><a href="http://github.com/garu/tweetylicious/commit/07f686afcbdb33cdb2f58cda7d96b2be99fa0b8a#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/07f686afcbdb33cdb2f58cda7d96b2be99fa0b8a/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">deleting posts via Ajax (rather, Ajaj, since we're using JSON ;) - </span></span><a href="http://github.com/garu/tweetylicious/commit/57346c7f45c99a286e2742ee52eb9f225070dd48#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/57346c7f45c99a286e2742ee52eb9f225070dd48/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">searching posts: search form template - </span></span><a href="http://github.com/garu/tweetylicious/commit/8a43b98e10e7f1751a10486e135aba7a2ceed0b1#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/8a43b98e10e7f1751a10486e135aba7a2ceed0b1/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">searching posts: jQuery effects - </span></span><a href="http://github.com/garu/tweetylicious/raw/8a43b98e10e7f1751a10486e135aba7a2ceed0b1/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/6abdd89fb85d399a640f9a33541668b6899fe9e0/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">searching posts: model - </span></span><a href="http://github.com/garu/tweetylicious/commit/e338ebe169481f60d8aaa9204d0b2fc358cf6d0b#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/e338ebe169481f60d8aaa9204d0b2fc358cf6d0b/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">searching posts: controller - </span></span><a href="http://github.com/garu/tweetylicious/commit/7bc3ebfdb8044fba42e8f83d5c6142b5080792ec#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/blob/7bc3ebfdb8044fba42e8f83d5c6142b5080792ec/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">searching posts: results template - </span></span><a href="http://github.com/garu/tweetylicious/commit/57a48574d9efacfac40b32e7f4e7fd51c44b3470#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/57a48574d9efacfac40b32e7f4e7fd51c44b3470/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">searching posts: jQuery (naive) formatting for topics (#topic) - </span></span><a href="http://github.com/garu/tweetylicious/commit/3da8b2ecb8021fd9ba6e40afde85c5c6402ac115#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/3da8b2ecb8021fd9ba6e40afde85c5c6402ac115/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">followers and following: the model - </span></span><a href="http://github.com/garu/tweetylicious/commit/f2c2644fb75f3e097be1263651117c1c2949bd20#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/f2c2644fb75f3e097be1263651117c1c2949bd20/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">followers and following: the controller - </span></span><a href="http://github.com/garu/tweetylicious/commit/5891bb54cd4183585b11be8a6aff70f0ec522556#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/5891bb54cd4183585b11be8a6aff70f0ec522556/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li><li><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">followers and following: template changes - </span></span><a href="http://github.com/garu/tweetylicious/commit/216fed6b3aae928a505fb034a54b1058e4a1c5a5#diff-0"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">diff</span></span></a><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">, </span></span><a href="http://github.com/garu/tweetylicious/raw/master/tweetylicious.pl"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: small;">full file</span></span></a></li></ol><div>Newer commits will likely be not as organized, and mostly bugfixing, but this should get people going - hopefully :P</div></div><div><br /></div><div>Well, that's it. Have fun!</div></span>garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com20tag:blogger.com,1999:blog-7734799596325955005.post-59928674312759542052010-05-18T15:02:00.001-03:002010-05-18T15:14:43.319-03:00Getting back at mst<div style="text-align: left;">Hi guys!</div><div><br /></div><div>Our dear Matt S. Trout's latest <a href="http://www.shadowcat.co.uk/blog/matt-s-trout/">blog</a> post is entitled "Exciting days ahead". Oh boy, I'm sure "exciting" is a very nice word. And no, I'm not speaking about the <a href="http://search.cpan.org/perldoc?perl5121delta">brand new Perl 5.12.1</a>.</div><div><br /></div><div>See, that post is dated April 14. That's over a month, and as such waaaaay past the <a href="http://ironman.enlightenedperl.org/">Ironman Challenge</a>'s 10-day deadline. If I remember correctly, and he made sure to say this over and over again:</div><div style="text-align: center;"><br /></div><div><i>"If I lose, I'm gonna let you guys pick a colour and a theme, and I'll do a talk about that theme with my hair dyed on that colour"</i></div><div><br /></div><div>Well, folks, it's time to collect!! =)</div><div><br /></div><div><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe2gf5IEzanXEGpa_6MvptdHHC_QRUEW5TizEoFiITds8bp7ZRDyifNiZ2qN6SeB2FfGhb2O5C6JMBbe8i-ZEu7gVVGGh2Fdu9fFdATrRHYZcZK9VjIgyT54ygROyGWMlF2ycedY6_CQky/s400/mst-colour.png" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 135px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5472670559942974306" /></div><div><br /></div><div><br /></div><div><span class="Apple-style-span" style="font-size:small;">Note: Granted, mst is a rather polemic character in our community. Love him or hate him, his contributions to modern Perl and to making the Ironman Challenge and the whole Perl blogging initiative the enormous success it is, are completely undeniable. He knows I'm blogging about this right now (though he likely doesn't know about my poor gimp talent) and is about to do a "press conference" on the subject himself - I just found it funny that no one said anything until now! Also, I lost the ironman challenge several times since I entered it, and likely so did you - the whole project of getting the Perl word out there is awesome and I'm sure all of us will keep doing it. The point is, none of us made half-drunk promises about not failing :PP</span></div>garuhttp://www.blogger.com/profile/00553247579311713092noreply@blogger.com7