March 2011 Archives

Fixing YAML::XS's memory leak

The Load from YAML::XS eats up quite a bit of memory, and it's deadly when I have to process a couple of hundred thousand YAML files. It still works, but the memory footprint grows without limit, and then it takes forever for the module to release all the memory at the end of the program. I actually got wise this time and checked the RT queue before I started and found the fix, which I only had to adjust a tiny bit.

RT 46172 has a patch for an earlier version of YAML-LibYAML, and also my adjustment for the latest issue. I've sent off a pull request for Ingy's YAML-LibYAML Github repo.

The patch works for me, but I'd also like to know if it works for other people.

Recreating a Perl installation with MyCPAN

A goal of the MyCPAN work was to start with an existing Perl distribution and work backward to the MiniCPAN that would re-install the same thing. I hadn't had time to work on that part of the project until this month.

The first step I've had for awhile. I've created a database of any information I can collect about a file in the 150,000 distributions on BackPAN. There are about 3,000,000 candidate Perl module or script files. That includes basics such as MD5 digest of the file, the file size, the Perl packages declared in the file, and the package versions.

The next step is wh…

A rough draft of Learning Perl 6th Edition

We're almost finished with the updates to Learning Perl, 6th Edition. The big changes for this edition are beginner-appropriate features up to Perl 5.14 and a lot more Unicode. I've keep keeping a diary of my progress at www.learning-perl.com. Now that we are mostly done, it's time for some tech reviewers to catch any lies (outright or by omission) that we've told. If you've done that for me before and would like to do it again, let me know and we'll make the proper arrangements.

In pre…

What should be core in Perl 5.16?

What are the Perl modules you immediately install when you get a new Perl? Jesse Vincent, the Perl 5 pumpking, opened the door, albeit slightly, to possibly considering maybe thinking about provisionally expanding the Standard Library. Is that modally weak enough for you? (Jesse tells me I misread him, so, maybe the door is not open and never was).

Larry designed Perl 5 to be extensible, which is another way of saying that he designed basic Perl 5 to be small. CPAN is great, but we also know that through various social and technical factors, mere mortals struggle with the idea …

Your Fantasy Perl Conference schedule

What talks do you want to hear at conferences? I recently finished going through the proposals for OSCON, and the ones I thought were really good were the ones the Perl committee solicited or helped to develop. That is, instead of waiting to see what speakers suggested and lived with that, we went out to get what we wanted. And, I think this is going to be a pretty good OSCON for Perl.

At Frozen Perl, Chris Prather, one of the organizers for YAPC::NA 2011, was telling me about their plan to schedule talks first and find speakers later. I was just checking the YAPC::Rīga website, and …

A Module::CoreList for vendor distributions

How much do perl distributions diverge from or augment the Standard Library? Lately I've been doing a lot of work with distributions that augment their standard Perl installations, so although I'm restricted to the distribution's Perl and its modules, most of the good stuff is already there. However, we don't have a tool like Module::CoreList that knows about vendor distributions.

Although I don't have the time to write it myself, I'd really like to have a tool that can report module presence and version for either the current operating system or any that I name:

$ corelistng --debian -a Scalar::Util

$ corelistng --macosx -v 5.10.0

This would be pretty handy when I have to put together a private MiniCPAN.

My Frozen Perl 2011 Keynote

I've uploaded the slides for my Frozen Perl 2011 keynote, in which I answer one part of the question "What are five things I hate about Perl?"

/users/brian_d_foy/2011/03/index.html

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