How Perl Happens

| 3 Comments

Jane is your average programmer. Jane works with Perl in her job. She's fortunate; her company knows how to use CPAN effectively. Whenever she needs to do something new, she searches CPAN for an appropriate distribution, evaluates it, and -- more often than not -- uses it to solve her problem.

Today Jane has another problem. There's a bug somewhere. She runs her tests and narrows it down to some new code she's written in the past week.

Her debugging leads her to a CPAN module she added a few days ago. With a little more work, she discovers that one particular method doesn't handle an edge case that her code provides. Fortunately, that module's page on search.cpan.org has a link to a public source code repository. She can check out the latest version and see if that solves her problem.

Today, it doesn't -- but that's okay. The CPAN page also explains where the author prefers to receive bug reports. Now Jane has options. She can write a test with her example and attach it as a patch to apply to the repository. She can write a general explanation and see if that triggers something in the author's mind.

Jane's motivated, today. She writes a test. She peeks inside the module's implementation and realizes that a single line of code will make the test pass. She writes that code -- and all of the tests pass.

She submits the bug report and her patches to CPAN's bug tracker. The author applies the patch and releases a new version of the distribution on the CPAN and the world is a little bit better for a little bit of cooperation between a couple of motivated people.

This is how Perl happens.

The Perl 5 core? Thousands of people have sent one or more little patch to correct a typo or add a new feature or update a core module or improve the documentation or fix a bug or speed up an existing feature or to make it work on a new platform. That's thousands of volunteers, motivated by the desire to make the world a little bit better -- sometimes for themselves or their employers and sometimes for other people.

The CPAN? Thousands of developers have donated code written for whatever purpose so that other people can use it freely.

Perl web sites? Perl mailing lists? Perl documentation and tutorials? The same.

None of this is by accident. Improvements happen because they're necessary and useful, but mostly because someone decides to take the Perl motto of JFDI (Just Do It, Friend!) to heart.

That goes for Perl 5, Perl 1, Perl 6, Parrot, CPAN, Catalyst, RT, Moose, CPAN Testers, and whatever other project in the Perl world you care to mention. With people willing to invest an hour or two to make even a tiny improvement, we make big progress.

Just do it, friend.

3 Comments

But what to do when you send bug report (fairly important: module in Test::* namespace can't handle pathnames with spaces) and even proposed patch... and nothing happens? No response, no fix.

What to do then? How to add fix so it can be distributed to one's program? How to escalate bug report?

But what to do when you send bug report {snip} and even proposed patch... and nothing happens? No response, no fix.

I think this might best be solved by dvcs's like Git. Just clone, apply your fixes, and make your clone available... Hm. Seems like it might be optimal if there were some kind of CPAN <--> git integration...

My experience with submitting CPAN patches has been 50% immediate response (either that the patch was applied or a request to make minor changes) and 50% no response at all. My personal record is getting a response 17 months (I think) after submitting a bug report through RT.

So, what to do? I maintain a copy of my installed/compiled CPAN modules (yes, all of them) in svn, and I also maintain a directory of my own patches that can be applied to those modules in the event of upgrades from CPAN. It might not be the best solution, but it works for me.

Modern Perl: The Book

cover image for Modern Perl: the book

The best Perl Programmers read Modern Perl: The Book.

sponsored by the How to Make a Smoothie guide

Categories

Pages

About this Entry

This page contains a single entry by chromatic published on November 12, 2009 4:54 PM.

From Novice to Adept: Pronouns in Perl was the previous entry in this blog.

From Novice to Adept: The Risk of Failure is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.


Powered by the Perl programming language

what is programming?