OxPM: Adding Perl Modules to my Web Site

Kate L Pugh kake at earth.li
Mon Feb 17 05:45:44 CST 2003


On Sat 15 Feb 2003, Brian Smart <brian.smart at blueyonder.co.uk> wrote:
> I have been trying to add a module to my web site but when I try, I
> am told (as part of the process) that my CPAN module needs to be
> updated to the latest version. Presumably because I do not have the
> authority to update the sever Perl files, it always fails.

I don't use CPAN.pm myself, but this sounds like a sensible reason for
it failing - have you managed to install other modules using CPAN.pm,
or was this your first attempt at it?

The times I *have* tried CPAN.pm, it's always complained about there
being a newer version but I just ignored it and it installed what I'd
asked it to fine.

> I have now tried to add the latest version to my web site and in
> doing so had the following responses from the server during the
> process.
> 
> [bsmart CPAN-1.65]$ perl Makefile.PL
> Lib=/home/sites/www.bms.me.uk/web/cgi-bin
> PREFIX=/home/sites/www.bms.me.uk/web/cgi-bin

This is confusing me slightly - did you type the Lib and PREFIX bits
or did the Makefile.PL emit those?  (If the former then I think you
want 'LIB' not 'Lib', and I also am not sure whether LIB is necessary
in all cases; I never use it and stuff works fine.)

> [bsmart CPAN-1.65]$ make
> cp lib/CPAN/FirstTime.pm blib/lib/CPAN/FirstTime.pm
> Skip blib/lib/CPAN/MakeMaker.pm (unchanged)

OK, this implies that this isn't the first time you ran make in this
directory (since otherwise the blib directory wouldn't even exist).
Is this the case?  What happens when you try this with
freshly-unpacked sources?

> Manifying blib/man3/CPAN::FirstTime.3
> /usr/bin/pod2man: Invalid man page - no documentation in
> lib/CPAN/FirstTime.pm

This is odd too - FirstTime.pm certainly does contain some pod documentation.

> Couldn't install blib/man3/CPAN::FirstTime.3

So it was expecting to find some documentation that it could strip out
and install as this man page - but couldn't.

> [bsmart CPAN-1.65]$ make install
> Installing /home/sites/www.bms.me.uk/web/cgi-bin/CPAN/MakeMaker.pm
> Installing /home/sites/www.bms.me.uk/web/cgi-bin/CPAN/FirstTime.pm
> Installing /home/sites/www.bms.me.uk/web/cgi-bin/CPAN/Admin.pm
> Installing /home/sites/www.bms.me.uk/web/cgi-bin/CPAN/Nox.pm
> Installing /home/sites/www.bms.me.uk/web/cgi-bin/CPAN.pm
> Installing /home/sites/www.bms.me.uk/web/cgi-bin/Bundle/CPAN.pm
> Installing /home/sites/www.bms.me.uk/web/cgi-bin/man/man1/cpan.1
> Installing /home/sites/www.bms.me.uk/web/cgi-bin/bin/cpan
> Writing /home/sites/www.bms.me.uk/web/cgi-bin/i386-linux/auto/CPAN/.packlist
> Appending installation info to
> /home/sites/www.bms.me.uk/web/cgi-bin/i386-linux/perllocal.pod
> [bsmart CPAN-1.65]$

OK, it looks installed apart from the documentation - although a
cgi-bin directory is kind of an odd place to keep perl modules.

> Does this look as though I have installed the module OK and if yes,
> how do I ensure that I use it rather than the version on the server
> root when I try to install other modules?

There is a CPAN (note not CPAN.pm) FAQ at
  http://cpan.org/misc/cpan-faq.html

which explains how to use modules in non-standard places:
  http://cpan.org/misc/cpan-faq.html#How_use_private

But I'm not sure how this would work with CPAN.pm

You might want to try one or more of:

(a) just hand-installing your other modules as you've done with CPAN.pm,
(b) trying CPANPLUS, the next-generation CPAN.pm (
      http://search.cpan.org/author/KANE/CPANPLUS/
    )
(c) asking on a busier mailing list such as london.pm (
      http://london.pm.org/join/
    )


Kake



More information about the Oxford-pm mailing list