Installing Pod::Simple on Solaris 9/10

Allison on 2008-09-11T09:30:17

After answering this in several individual emails over a year or so, I figure I'll stick it somewhere googleable. If you're attempting to install Pod::Simple and get something like the following error:

Can't locate Pod/Simple.pm in @INC (@INC contains: [...]) at /usr/local/lib/perl5/5.8.8/Pod/Man.pm line 35.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/Pod/Man.pm line 35.
Compilation failed in require at /usr/local/lib/perl5/5.8.8/ExtUtils/Command/MM.pm line 92.
*** Error code 2
make: Fatal error: Command failed for target `manifypods'

You've ended up with a version of Pod::Man installed that has a dependency on Pod::Simple, without first installing Pod::Simple. (That shouldn't be possible, since Pod::Man has a check for Pod::Simple in the install process, but that doesn't guarantee it can never happen, especially with a vendor install of Perl.)

So, the thing to do is run the install for Pod::Simple twice. (The first time through you won't get the manpage entries for the modules, but otherwise it'll install fine. The second time through you'll get the manpage entries too.) The first time you'll need to edit the Makefile manually. Find the line that looks like:

# --- MakeMaker top_targets section:
all :: pure_all manifypods

and change it to:

all :: pure_all

Then run 'make', 'make test', and 'make install'. Once you've done that go back and run:

make clean
perl Makefile.PL
make
make test
make install

Once you have Pod::Simple installed, you won't get that error from Pod::Man anymore, so manifypods should work for everything else you're installing too.