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

Re: "What perl looks like under debian" (Highlights from the perl-policy)



On Fri, Aug 8, 2008 at 2:12 PM, Jeremiah C. Foster
<jeremiah@jeremiahfoster.com> wrote:
> 2a. What perl looks like under debian
>
>    The version of perl on etch is now 5.8.8 but soon it will be 5.10
>    when etch and a half is released. Debian packages perl according
>    to the FHS (File Hierarchy Standard) to provide Debian users with
>    a predictable file system layout. This allows software to be
>    written because the system is already mapped, one knows where to
>    find things. So the perl binary on a Debian system is in
>    /usr/bin/perl, exactly where the FHS says it should be. This in
>    turn allows you to write the shebang line in your debian perl
>    scripts thusly: #!/usr/bin/perl.

It's nice to know things are stable BUT one of the selling points of
Perl is that
the code is platform independent.
Thus encouraging something that is Debian specific is IMHO not a good idea.

Which means to me a good Perl script is capable of finding the perl interpreter.
The way it can do this is by packaging it as a CPAN-ish module and then
during the installation MakeMaker or Module::Build or M::I will rewrite the
shebang to the one on the current system.

If there is an easy way to create a .deb from a CPAN-ish module then maybe
the best recommendation would be to write and package your script as a CPAN
module. Then create a .deb from it and install that.


>    On Debian, the order of perl, vendor, and site has been
>    reversed. This of course means that @INC will search through the
>    site dir to find installed modules first, then vendor, then
>    finally perl although this is called "core" on debian and is
>    reserved for those modules that ship with the perl binary itself,
>    i.e. Test::More. These directories look like this:
>
> site:   /usr/local/lib/perl/version
>        /usr/local/share/perl/version
>
> vendor: /usr/lib/perl5
>        /usr/share/perl5
>
> core:   /usr/lib/perl/5.10
>        /usr/share/perl/5.10
>
>    To quote the perl-policy; "In each of the directory pairs above,
>    the lib component is for binary (XS) modules, and share for
>    architecture-independent (pure-perl) modules."  So if you are
>    going to install something from CPAN using cpan or cpanp, you
>    would end up installing into /usr/local/{share,lib}/perl/5.xx if
>    you did not alter your cpan configuration. If you use apt-get or
>    any other native debian package management tool to install a perl
>    module, that module will get installed into /usr/{share,lib}/perl5/.

I don't know this stuff. Send this to the p5p list as well and ask them what
do they think.

regards and cu

   Gabor


Reply to: