I decided to take a look at Catalyst on Solaris. Having done a bit of work with it on Mac OSX, I discovered it wasn't that easy to get going on Solaris with the stock Perl. Even using cat-install from ShadowCat didn't render the easy result I'd experienced using MacPorts. After a few hours battling with CPAN, I've managed to come up with this list of modules to get Catalyst up and running.

The reader should note this was done on Solaris 10 update 6, on x86 hardware (well, in VMware actually). comments: true

I tend to build perl modules to live in my home directory. Setting up CPAN with PREFIX= and LIB= variables means I can compile/build modules without being root and use them in any script with a simple 'use lib ...' statement.

Matt Trout of Shadowcat Systems has written local::lib to make this process a whole lot easier.

There's a good example of setting up local::lib at the Catalyst homepage.

However, try to install local::lib with the 'perl Makefile.pl --bootstrap' on a Solaris 10 machine with the system Perl and system tar and you'll come unstuck.

This is because the newer CPAN module, which local::lib requires, has a filename with a path greater than that supported by the POSIX compliant Sun tar. The installation will break, trying to install CPAN into a system path and thus asking for sudo access.

I've discussed this at length with Matt Trout, and thanks to his time and debugging efforts we know it's CPAN - and hopefully Matt's feedback to CPAN author Andreas Koenig will result in a fix RSN.

In the meantime, here's a simple process that will ensure local::lib installs cleanly.

1) Install CSW or Blastwave gtar.

2) Make sure ~/perl5/bin:/usr/perl5/bin:/opt/csw/bin appears on your PATH - in that order.

3) Run 'cpan' and configure, making sure makepl_arg gets set to ~/perl5, prerequisites_policy is set to follow and tar is set to /opt/csw/bin/gtar

4) export PERL5LIB=~/perl5/lib:~/perl5/lib/site_perl

5) cpan Test::More Test::Harness File::Temp ExtUtils::MakeMaker ExtUtils::CBuilder ExtUtils::ParseXS Module::Build CPAN

6) Download the latest release of local::lib, untar, and install with 'perl Makefile.PL --bootstrap && make && make install'

7) unset PERL5LIB, clear cpan makepl_arg

8) eval local::lib as per the instructions, and insert into your chosen shell's init script (~/.bashrc, for example)

And you're good to go with local::lib!


comments powered by Disqus