The Alpaca gets a second printing

Most tech books have trouble selling even a couple thousand copies, which makes it tough for a publisher to figure out how many to print at first. Print too many and they’ll just sit there, or worse. The publishing industry is a bitch because the book shops can returned unsold inventory and get money back. On every royalty statement, I have a “reserve withheld” and a “reserve returned”. The publisher reserves some of my royalty in case the book stores return books. After a certain period, they return that. But, they then withhold more. That’s just the way it is. » Read more…

Clarifying local::lib and cpan in Chapter 2

local::lib is highlighted in Intermediate Perl when I go through the CPAN tools in Chapter 2. Each of the tools has a slightly different set of features and I try to steal the good one. I added a local::lib to cpan so you can add the local::lib defaults for a one-shot installation process. This steals a feature from cpanm which has a --local-lib option: » Read more…

Answers for O’Reilly PR

The O’Reilly public relations people asked me to answer some questions about the new Intermediate Perl so they can prepare materials for reviewers and the press. As a reader of this website, however, you get the answers before they do, and you get my full answers, which might show up as edited excerpts in O’Reilly’s materials. » Read more…

Get 50% off Perl ebooks, including Intermediate Perl

You can buy Intermediate Perl now, directly from O’Reilly in ebook form. For the next week, you can buy it for 50% off using discount code WKPER5.

50% off

Every ebook from O’Reilly is DRM free and come in PDF, ePub, and Mobi formats. If you’ve authorized O’Reilly’s Dropbox app, once you’ll purchase the books they’ll sync to your Dropbox account (in ~/Dropbox/Apps/O’Reilly Media). You can read them on any device anywhere you are.

The print version is still making its way out of the printers and to distributors, but we expect it to show up in the next three weeks.

Intermediate Perl is available for pre-order

You can now buy Intermediate Perl. I’ve just submitted the final changes and the final publishing bits should finish this week, sending the result to the printers very soon. The book should ship before the end of August.


If I haven’t listed your favorite bookseller, send a link.

Syntax coloring in Intermediate Perl PDF

O’Reilly wants to try an experiment with the Intermediate Perl PDF. We’re not limited by the physical process of putting ink on paper (and it’s a bit expensive to have more than one color of ink). I’m just going to show you the images and let you tell me what you think. » Read more…

Fixing bugs instead of explaining them

David Golden, one of the reviewers for Intermediate Perl, gave me extensive comments about one of the test program examples in the book. I made a simple example using Test::Output, a module I sometimes use but didn’t write. It solved my needs at the time, but it has some issues. Perl’s output is complicated, and the simple tie in Test::Output::Tie doesn’t cover all the cases.

I’m the current maintainer of the module, and rather than explain the edge cases in my example (or fix the module), I merely mentioned to David that we should reimplement Test::Output with Capture:Tiny, his module that handles almost all cases. I meant “we” in the universal sense, and I didn’t say much because I was busy writing the book. A couple of hours later, David sends me a pull request.

That often happens as part of the writing process. If something is too hard to explain, it’s probably too hard to use. The time explaining it is better spent making it clear, unbuggy, or whatever it takes to avoid the explanation. In this case, it’s even better when someone else did it.

The Alpaca is on its way

O’Reilly now has Intermediate Perl, Second Edition. Just this morning, in time for the open of business on the East Coast, I finished fixing the final reviewer comments. I went through over 300 pages of extensive comments: » Read more…

Multiple package VERSION declarations

I’m re-reading the parts of Intermediate Perl where we introduce packages. Perl v5.12 introduced an expanded package syntax to include a version and a block:

package Foo { ... }
package Foo 1.23;
package Foo 1.23 { ... }

That almost seems to imply that you’d have to completely define the package inside the block if you use a block, but as you know from everything else you’ve experienced in the language, Perl is happy to let you muck with other things. You can add to the package later: » Read more…

Moose in the Alpaca

We’re putting Moose, the “postmodern object system for Perl 5”, in Intermediate Perl, but only as a short introduction. If you want more coverage, you should still look at Moose by Dave Rolsky and Stevan Little.

We started with Randal’s columns from Linux Magazine way back in 2007: “The Moose is Flying (Part 1)” and “The Moose is Flying (Part 2)”. We’ve updated it and showed a couple more topics.

If you’re a Moose user and would like to see what we’ve put together before it goes into the book, especially to ensure that we’re doing all the right things with the latest practices.

We’re also looking for a limited number of people to review larger sections of the book. You’ll get a sneak peek at the book, and we’ll do something nice for you once the book comes out.