You know you're a Perl programmer when...

When you're thinking of packaging every piece of code as a CPAN module.

A couple of days ago I need a subroutine that takes a nested data structure (e.g. {vol1 => {a=>{b=>{c=>10}}}, vol2 => {a2=>{b2=>{c2=>20}}}}), a Unix-like path string (e.g. "vol1:/a/b/c") and return the branch/leaf node of the data structure according to the specified path (in this example, 10).

After browsing CPAN and a few minutes of reading the POD of some modules and not finding exactly what I wanted [*], that subroutine idea quickly transformed into an idea of a full-fledged CPAN module. The next day I uploaded Data::Filesystem to CPAN, which is actually yet another Data::Walker- / Data::Path- / Data::DPath-like module.

Help Vampires

Watch out for [Help Vampires](http://slash7.com/2006/12/22/vampires/).

How Open Source is Possible (at least one part)

Often times I find myself wondering how Open Source is even possible. How does something so amazing as CPAN get built and maintained and perfected?

I think I figured it out, at least one part of it.

It is possible because there are a lot of smart people out there being employed by employers who have no real idea of what is required in any given project. Therefore, programmers who have

  • tremendous flexibility to get "whatever they want" done to accomplish a given project
  • employers/managers who don't know the first thing about what is required to create an application

can contribute amazing feats of collective heroism day in and day out, without having to worry about how they are going to pay for new shoes.

And then of course there is boredom. And the sheer enjoyment of coding. And altruism.

Perl, Dancer, Android, Haifa.pm!

A few days ago Shmuel Fomberg (who organizes Haifa.pm) wrote in the Israel.pm mailing list: "Sawyer is doing so many interesting things currently, that it is ridicules. Sawyer, please take a long vacation to let us all catch up!".

While this truly flatters me, I reckon that's how I think of a lot of other developers (and I'll refrain from the usual name-dropping I'm accustomed to). Whatever I play with is always minimal in comparison to the stuff I see in the Perl community. This includes both Devel::Declare and the amazing Perl Onion Pillow.

Fifth Issue of Perlzeitung

Its a magazine most of you here would not read, bacause it explaines most of the time basic perl stuff. But many of you, I guess, care that there is a beginnerfriendly Perl publication. So do I. Thatswhy i wrote 2 articles for this isssue. About Perl 5 references and one about Perl 6. Also Perl beginner have a right to have a broad overview what is perl 6 about and how it is going. I think I never summarized it in such simple terms before. Maybe that spark your interest? :) But its written in German, as the name suggest.

My YAPC::Russia 2009 (May Perl 2) trip

I'm only a year late with this post; I wrote it in the airport in Moscow on the way home, then it never made it onto the blog. I need to published it before the next YAPC Russia, which is June 12-14 in Kiev this year.

This might be the only YAPC::Russia 2009 report you read, if only because I was the only presenter in english and maybe the only one writing about it in english. While everyone else's english got better over the conference, I think my Russian got worse.

The best reason to go to a conference is to meet new people, to see new places, and, oh, sometimes to see new code. The more interactions that we can get between the different parts of the physical world the better. If you always go to the same conference, you might be limiting the people you can meet.

St. Basil's Cathedral

Text Entered Was Wrong

Many people have been seeing the cryptic error message "Text Entered Was Wrong" when trying to use this site. It was caused by MT expecting to see the response from a CAPTCHA which wasn't being displayed.

It's taken us a while to get to the bottom of this problem, but we think that we have fixed it now. We think that the CAPTCHA will now be displayed in all of the circumstances when MT thinks it has been displayed.

Sorry for the inconvenience this has caused. Hopefully this will allow a larger selection of people to use the site successfully.

As always, please let us know if you are having any problems with the site.

My Perl Pillow

perl-pillow-tpf.jpg

flickr

Crear una pagina web con Perl y mysql

**Realmente existen muchas formas de hacer esta misma tarea con Perl,
ilustrare las mas rapida usando el modulo Template::Toolkit que segun mis estadisticas viene instalado por defecto en todos los hosting CPANEL..

Si quieres ver si el modulo, entra a tu Cpanel y en servicios entra a modulos de Perl, luego ver modulos instalados en el sistema **
.

Thanks Eyjafjallajökull! I'll give my NPW talk virtually.

I can't make it to Iceland for the Nordic Perl Workshop, which I think is all but officially cancelled now while Eyjafjallajökull does its thing. NPW might reschedule for later in the year. Maybe we can turn this into a virtual conference, though. I'll see what I can do to give my talk here and upload the audio and video. Maybe other people can do the same, or at least upload their slides.

Most of the problem in the re-routings of airlines. I was flying from Boston to Keflavík on IcelandAir, but now those direct flights are cancelled. The reroutings are through Glasgow and other odd places with extremely long transfers. By the time I got to Reykjavík, it would be time to come home again. Curiously, I think this would have affected my travel to anywhere in Europe since the backlog of passengers is clogging planes, and flights from the US to anywhere in the Nordic area are still affected.

IcelandAir is offering full refunds, although it looks like they have to process them by hand. The Hotel Loftleiðir has a full refund policy if you cancel 24 hours before arrival, but their website is wonky so I had to write to them by email at icehotels@icehotels.is.

DBIx::Class Anti-Verbosity

Every time I set up a DBIx::Class schema for a project, I find myself re-implementing the same pattern. While DBIC is one of the great things about modern Perl, it requires a lot of typing. Whenever I want to grab some stuff from a table, it's

my @records = $schema->resultset( 'CamelCasedClassName' )->search( ... );

Today, I used DBIx::Class::Schema::Loader to auto-generate a schema for a fun little 182-table database. I ended up with modules with names like MyApp::DBIC::Result::XStreamQueryParentArticle and MyApp::DBIC::Result::ArticleElementContent and so forth. Very useful, but what painful nomenclature.

So I ended up doing the same little hack that I always do, but improved upon it a bit this time, and have finally arrived at a solution that I really like.

The people that make the perl community great

Today, I ventured into #dbix-class inquiring about some performance problems I was having. I wasn’t complaining about the speed of DBIC, I was looking for ways to trim out work that I was doing that I could avoid doing. The script I was running (file parser + insert into DB) was taking a little more than an hour to run. I was musing whether to drop DBIC, parallelize the job or just deal with the slowness when** ribasushi** (Peter Rabbitson) came to the rescue. After sharing with him a copy of NYTProf’s output, he quickly identified some hot-spots in SQL::Abstract that could be worked on. Soon enough, Caelum (Rafael Kitover) chipped in and we had improvements (some XS code wasn’t being used) in Class::Accessor::Grouped coming. Within an hour I was upgrading CAG, SQLA, DBIC and installing Class::XSAccessors and profiling the code again.

Total improvement: time spent inside CAG dropped by 57% and 44% in SQLA Total time elapsed: ~2 hours.

If this is not a sign of what makes the perl community great, I don’t know what is.

The code is not flying any any means, but the total runtime was reduced by 34%, which is not bad for an evening’s work.

SQL::Abstract Changes DBIx::Class Changes

(read on for comparison of the top 15 subs)

XML::Tiny bugfix - and last post here for a while

Nick Dumas reported a bug in XML::Tiny, and provided a patch which I've applied. Version 2.04 supports quote characters in CDATA in attributes.

And this is my last post here for a while. I'm fed up with the hopelessly inconsistent behaviour and random failures. Even use.perl works better.

TelFOSS Meeting Review + Slides

Yesterday we had another Tel Aviv Free and Open Source Software meeting.

The meeting took place at a new venue provided by Amir. The venue was Shenkar engineering and design school in Ramat Gan (which is like an extension of Tel Aviv - so it's cool :)

A lot of people came to the meeting, and it was very nice to see so many new faces. This time we had a review of "Programming Pearls" which Shlomi Fish gave, followed by a lecture on Source Code Management systems (also called Version Control Systems) given by me.

It was a refreshing experience to speak of something that all programmers had in common and although I thought we're going to have tackles of "Git vs. Subversion vs. whatever", we didn't. We had interesting discussions on programming paradigms, policies and programming conventions and how SCMs can help or impede them.

My notes from the Vienna QA Workshop

I don't have time this week to say more on this, but I need to get my notes off my mind:

Zooey Deschanel to star as Ada

Apparently a movie about Ada Lovelace is in the works. Zooey Deschanel, whom many of you will remember very fondly as Trillain in the Hitchhiker's Guide to the Galaxy, is said to have agreed to play Ada. A brilliant choice.

Ada is one of the most important people in the history of Western thought. And perhaps for that very reason, she is a lightning rod for denialism like perhaps no other woman thinker. I once heard a panel of three experts on BBC unanimously diminish her into a Babbage hanger-on. To do this, these experts had to ignore the distinction between a big calculator and a computer and forget the one between software and hardware. This they were able to do by gossiping about opium and race tracks.

The Second Age of Perl

For years people have been saying that Perl is dead or is dying. I've even said it, although not with the same implied meaning.

Today, with the power vested in me by myself, I hereby declare that we are now in the Second Age of Perl; and it has nothing to do with Perl 6!

It's not that I don't like Perl 6 / Rakudo. I actually love it, but I don't make my living from it. Perl 5 is what brings home the bacon, and my guess is that it will be that way for years to come.

Why Perl 6 is different

Let’s be honest. Perl 5, Python, Ruby, they’re almost the same. There are some differences, but when your compare them with C, Java, Haskell or some such they suddenly feel rather superficial. They suitable or unsuitable for pretty much the same tasks, occupying a niche that Perl pioneered: that of a high manipulexity and whipuptitude.

They each operate at the same abstraction level. Even if a language is lacking a feature that the others have, it’s easily implemented using other constructs. There are plenty of valid reasons to prefer one over the other (taste, library availability, programmer availability), but they all offer the same power. Perl 6 is going to change that.

Perl 6, like Perl 5, Ruby and Python steals a lot from other languages. As you may expect, it steals too many things to mention from Perl 5. It steals chained comparisons from Python, objects from Smalltalk (in particular Squeak’s traits should be mentioned). It thankfully steals nothing from PHP.

Q: How to delete an obsolete file (not module) from CPAN?

Hi Folks

At some time in the distant past, the CGI::Session distro contained the file CookBook.pm.

It still lives, in V 3.95!

CGI::Session is up to V 4.42.

Firstly how do I arrange for this file to be deleted?

Secondly, how many other derelict files await their obliteration, both in different versions of this distro and in other distros?

Poll: What is the primary operating system you use for developing Perl applications?

I already ran two quick polls about IDE usage in the Perl community.
Let me run a new one asking What is the primary operating system you use for developing Perl applications?. I'd appreciate if you invested 5 secs to answer it.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.