Dan Dascalescu: April 2009 Archives

A few days ago my Linode VPS ran out of its 360MB of memory during a CPAN installation. CPAN does indeed eat up a lot of RAM, and this is in large part due to the process of building its in-memory database of modules. Fortunately, there is a CPAN module that provides a solution to this problem: CPAN::SQLite.

CPAN::SQLite is a drop-in add-on for CPAN.pm, which can make CPAN store its data in a SQLite database. After installing it, I noticed a reduction from 75MB to 21MB of the amount of RAM used by CPAN while installing a sample module.

Getting CPAN to use CPAN::SQLite is simple:

$ cpan CPAN::SQLite
$ perl -MCPAN -e shell
cpan> o conf use_sqlite 1
cpan> o conf commit

Once you have done this, you can use the cpan command normally to install modules, only now it will use significantly less memory while doing so.

Be aware that CPAN::SQLite only works with the most recent releases of CPAN modules. Make sure to read the caveat about this if you think it might affect you. Then enjoy the extra RAM!

Perl might have been born on UNIX, but it's also renowned to be one of the most portable programming languages. In spite of this, people generally don't think of Windows as a Perl development platform.

You might be surprised to discover that Windows is quite a suitable environment for developing with Perl. In fact, you can do almost everything you do on *nix Perl on Windows, and if you're proficient with Windows, you can keep using it and code Perl efficiently.

Today, we will show you to set up your Windows machine for Perl development, and a few of the options you have available in the way of integrated development environments.

Sponsored By


Ionzero: Rescue your dev project.

Following

Not following anyone

Note to spammers: all comments are moderated. Don't waste your time