June 2011 Archives

When do you upgrade perl?

How do you decide to move to another version of Perl? Some people use the latest version right away, some people make big jumps once a decade. Some never upgrade. What's your style?

I made a SurveyMonkey page for it: http://www.surveymonkey.com/s/DX5HW95.

Pass it around, tweet it, facebook it, buzz it, bump it, do whatever you crazy social kids do. Retweet it.

You don't have to justify anything. I don't really mind if you are using an older pe…

O'Reilly's big 50% off Perl ebook and video sales

In celebration of OSCON, O'Reilly Media is offering 50% off Perl ebooks and videos for a limited time (ending tomorrow I think). That means that the PDF (non-DRM) version of Learning Perl, 6th edition is only $15.99. This sale includes Randal's video version of his Learning Perl course for only $74.99.

Learning Perl, 6th Edition is now available

You can actually get Learning Perl, 6th now. It has the latest updates for Perl 5.14, and is much more Unicode friendly (but in a gentle way). So far, it's available directly from O'Reilly Media, it's in Safari Books Online, and it's making its way into the distribution channels for availability in the next two weeks from the book sellers.

There will be piles of them at OSCON, …

Does do-given work right?

[This is now [perl #93548]]

Perl 5.14 added a return value to given if you put it inside a do. However, it looks like that return value can't be a value in a lexical variable the you define inside the given:


use 5.014;

my $foo = 'foo!';

foreach my $string ( qw(foo bar baz quux hoo) ) {
    my $got = do {
        my $bar = 'bar!';
        given( $string ) {
            my $baz = 'baz!';

            when( 'quux' )    { my $quux = 'quux!' }
            when( 'foo' )     { $foo               }
            when( 'bar' )     { $bar               }
            when( 'baz' )     { $baz               }
            default           { 'default'          }

    say "$string got: $got";

This gives me:

foo got: foo!
bar got: bar!
baz got: 
quux got: 
hoo got: default

What am I doing wrong there?

The difference between distros, modules, and programs; and how that affects indexing

Programs, modules, and distributions are different things, but we are often loose with the language. In CPANizing Behavior and Democratizing Publishing, chromatic conflates two issues that are really only loosely connected: making modules and releasing code as a Perl distribution.

Distributions are merely the unit of things we give away. A Perl distribution has a conventional structure, and usually contains modules. However, there's no requirement that it contain any mod…

How about a YAPC::Africa in Tunisia?

At the Nordic Perl Workshop in Malmö, Nadim Khemir and I were talking about having a Perl event somewhere warm. He suggested Tunisia, where he's from and where he knows a lot of people. The more I thought about it, the more I wanted to be part of the first YAPC::Africa. I encouraged him to announce it during NPW, which he did, but forcing me to help as an organizer.

As with any new set of organizers, we don't have all of the details yet. We're thinking about sometime in the spring of 2012.

  • There's easy access from Europe…

I'm moving on from the perlfaq

After a long, long time maintaining the perlfaq, I'm moving on from that part of my work in Perl. That leaves a spot for someone else to step in. The latest stuff I had in my briandfoy/branch was merged with blead earlier this week, but any changes I had queued up on my local machine are going to drop through the cracks. I can send that to-do list to anyone who'd like to take on the job.

As such, I'm also stopping the autoposter to comp.lang.perl.misc. This was driving all of the updates as the people in that newsgroup noticed even the most trivial of error…

Programming Perl, 4th Edition in time for holiday gifting

Tom Christiansen mentions in a comment on Stackoverflow that Programming Perl, 4th Edition should be out in October. It's already in the public O'Reilly Media catalogue and available for pre-orders (and so is you can pre-order Learning Perl).

Bad Mail Day

I really know a lot of Perl people, and whatever is going on in my Gmail account is reminding me of that. For some reason, someone wants the world to think that I want all of you to buy Viagra and watch a stupid YouTube video. I think the YouTube thing is just a red herring for the spam filters. If you don't want to buy fake Viagra, don't follow the stupid links.

Thanks for everyone who responded to the spam to let me know something was going on. I won't respond to the hundreds of messages I got telling me that. At least it's nice to know that people read my mail, even when it is spam…

About brian d foy

user-pic I'm the author of Mastering Perl, and the co-author of Learning Perl (6th Edition), Intermediate Perl, Programming Perl (4th Edition) and Effective Perl Programming (2nd Edition).