[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: perl module installation question



On Mon, May 14, 2001 at 08:05:55PM +0100, Steve Haslam wrote:
>I'm trying out the perl 5.6.1 trial packages, and I have a question...

[Note to debian-perl] trial 5.6.1 packages are here:

    deb http://people.debian.org/~bod perl/$(ARCH)/
    deb-src http://people.debian.org/~bod perl/

>If a package (I'm thinking of irssi-text here, libapache-mod-perl may
>be relevant too) embeds a Perl interpreter and supplies .pm files for
>specific utils, where should the .pm files be installed?

The simplest place is the vendor dirs:  /usr/{lib,share}/perl5 as these
are already in @INC, although an embedded application could choose to
install modules into some package specific directory (something like
/usr/{lib,share}/irssi/perl for example) then tweak @INC internally (the
vile package does this for example).

>In irssi-text, they are:
> /usr/lib/perl/5.6.0/Irssi.pm
> /usr/lib/perl/5.6.0/Irssi/Irc.pm
>
>but libperl.so.5.6 from 5.6.1 will not pick these up- is there no way
>round this? (a recompile will put them in /usr/lib/perl/5.6.1) or
>should they be put in /usr/lib/perl5? I can't find an answer to this
>in http://people.debian.org/~bod/perl-policy/

You're quite correct.  irssi-text is wrong.  I filed a bunch of bugs on
packages with incorrect directories--see #95535 in this case.

There's no specific information in policy regarding programs which both
embed an interpreter *and* provide modules although as a general rules
no package outside of perl may install into /usr/{lib,share}/perl.

Personally I prefer the latter scenario described above, of installing
into a package-specific directory when the modules are only usable from
the within the context of the interpreter embedded into the program.

The irssi code has a way to do this with a confiure option:

  --enable-perl-path=/usr/lib/irssi/perl

although the patch I just appended to #95535 doesn't do that (as I
didn't notice until just now :).

Regards,
-- 
Brendan O'Dea                                        bod@compusol.com.au
Compusol Pty. Limited                  (NSW, Australia)  +61 2 9810 3633



Reply to: