views:

61

answers:

2

I was recently trying to upgrade a few Perl modules on my cell phone (nokia n900), and installing the latest copy of Module::Build took the better part of an hour.

Most of the time (70% ish) seemed to be spent parsing and indexing the repository information.

It seems there are a few options, such as not rebuilding the index cache each time, or using CPAN::SQLite.

I would like to continue using CPAN on the device, rather than installing the modules manually. So I am wondering what techniques people have had success with on similar limited resource devices (slowish cpu, limited ram, slow disk (flash))?

A: 

If the module is pure Perl (i.e. has no XS components and does not require any library to be compiled), you can install the package on another machine of a different operating system into a local::lib directory, and then simply copy that directory over to your device.

Otherwise (if compilation is necessary), the same technique can be used to only build the module once, so long as you install it on a device of the same architecture; after that, you can share the library between multiple devices. e.g. once you build these packages, you can put them up on your webpage to be shared among other Nokia n900 users, and gain many friends. :)

Ether
+2  A: 

I believe this was one of the primary reasons why Miyagawa created cpanminus.

From the POD:

Another CPAN installer?

OK, the first motivation was this: the CPAN shell runs out of memory (or swaps heavily and gets really slow) on Slicehost/linode's most affordable plan with only 256MB RAM. Should I pay more to install perl modules from CPAN? I don't think so.

I've not used cpanm on a limited resource device/machine but I have been using it exclusively on my Perl 5.12 dev and its been a dream!

/I3az/

draegtun