October 2011 Archives

I need pack examples for the Camel

I'm working on the pack section in Programming Perl and learning about all the templates things that I've never used.

Does anyone have examples (or know where some are) that use:

  • @ with a repeat count
  • . with a repeat count
  • ( with a repeat count

Also, which modules make extensive use of pack? I used to in my Mac::iTunes (now outdated) module, but I was going very rudimentary things that I now see I could have done much better with other pack features.

Perl traps for Ruby Programmers

To list in the next Camel the gotchas Ruby programmers might have run into with Perl, I've really had to dust off my Ruby skills, few as they are. I got a lot of good feedback for my Perl traps for Python Programmers, both public and private, so I'm doing it again for Ruby.

I'm only interested in the practical aspects of a person used to Ruby moving to Perl and the things they might try to do based on their Ruby experience. Also, since we already covered some things in the Python secti…

Perl traps for Python Programmers

I'm updating the Camel. Chapter 24 has short sections for people moving from one language to the next. Right now I'm working on the Python section. My Python is rusty. If you started in Python and moved to Perl, I'd like to hear about the gotchas that you didn't expect.

This is absolutely not a platform for bashing another language. I don't care about any of that. I don't care why the readers want to use Perl or why they want to use Python. I care about people who are used to doing something one way in Python and might be surprised why that's not obvious or apparent in Perl.


How do you select the best installed version?

I'm writing about the Standard Perl Library for the Camel book (it still feels really strange to say something like that, like "Yeah, I'm helping ol' Mike paint the ceiling in this church, boy does my back hurt"). I'm going through the various installation directories and the limitations of @INC.

As you know, Perl searches @INC for a matching file. When it finds it, it stops. It won't keep looking for a later version

The ambitious can get around this. You could write a code reference that you stick in the front and completely reimplement the whole process. You can pre-s…

Where was Sharon Hopkins's Perl Poetry Published?

I'm looking for references to Sharon Hopkins's Perl poetry in The Economist and The Guardian for my update of the Camel Book. The Economist website is down right now, and my search in The Guardian turned up nothing.

Does anyone have these references? She didn't list them in "Camel and Needles".

A map of the CPAN Ecosystem

I'm making a map of the CPAN Ecosystem for Programming Perl:


It's just something I threw together so the O'Reilly people could make a nice looking diagram. I'm a bit fuzzy on some of the services pulling either from the CPAN master, a mirror, or something else.

I left a lot out; I only have a page so large and I don't cover other things in the CPAN chapter.

A module version of perlbug

I want a cpanbug that's like perlbug. I don't have time to do this myself, but I've often wanted it. A long time ago, I wrote about the module equivalent for perlbug. Essentially, you say something like this:

% cpanbug Some::Module

It collects a lot of information, just like perlbug, and then sends it to the right place, which might not be rt.cpan.org. For instance, it might be Github.

That might be easier now with the improvements to the META spec and the MetaCPAN API.

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).