Den besten Beweis liefert Debian 7.2.
Perl 5.14 wurde ganz normal über apt installiert wie folgt:
perl 5.14.2-21+deb7
perl-base 5.14.2-21+deb7
perl-mdoules 5.14.2-21+deb7
cpan hatte ich laufen lassen mit
cpan CGI, installiert auch fein das neue CGI 3.64.
mal kurz sehen:
root@server2 ~ # perl -MCGI -E'say $CGI::VERSION'
3.63
root@server2 ~ #
Nanu?
Jetzt mal schauen wo es gestreut hat.
root@server2 ~ # find / -name "CGI.pm" | xargs grep "::VERSION="
/root/.cpan/build/CGI.pm-3.64-w5d1hs/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-w5d1hs/blib/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-Opb5xj/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-Opb5xj/blib/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-rQzfOj/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-rQzfOj/blib/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-ihchoW/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-ihchoW/blib/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-8gCFFm/lib/CGI.pm:$CGI::VERSION='3.64';
/root/.cpan/build/CGI.pm-3.64-8gCFFm/blib/lib/CGI.pm:$CGI::VERSION='3.64';
/usr/share/perl5/CGI.pm:$CGI::VERSION='3.61';
/usr/share/perl/5.14.2/CGI.pm:$CGI::VERSION='3.64';
/usr/local/share/perl/5.14.2/CGI.pm:$CGI::VERSION='3.63';
WTF!?
So ein Mist.
root@server2 ~ # perl -E'say for @INC'
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl
.
root@server2 ~ #
Och nö, näh?
Modulpfade bei Debian-Paketen?
Quote2.3 Module Path
Perl searches three different locations for modules, referred to in this document as core in which modules distributed with Perl are installed, vendor for packaged modules and site for modules installed by the local administrator.
The module search path (@INC) in the Debian packages has been ordered to include these locations in the following order:
site (current)
Modules installed by the local administrator for the current version of Perl (see Locally Installed Modules, Chapter 3).
/usr/local/lib/perl/version
/usr/local/share/perl/version
Where version indicates the current Perl version ($Config{version}[1]).
vendor
Packaged modules (see Packaged Modules, Chapter 4).
/usr/lib/perl5
/usr/share/perl5
core
Modules included in the core Perl distribution.
/usr/lib/perl/version
/usr/share/perl/version
site (old)
site directories (as above) for modules installed with previously released perl packages for which the current package is binary compatible are included if present.
In each of the directory pairs above, the lib component is for binary (XS) modules, and share for architecture-independent (pure-perl) modules.
http://www.debian.org/doc/packaging-manuals/perl-p...
//EDIT
Dann mal
perl -V
more (16.1kb)
//EDIT
Jetzt schlägts 42!
cpanp -i CGI installiert korrekt!
Dann zeigt perl selbst bei CGI auch die 3.64.
Kann mir jemand erklären wieso cpan nach /usr/share/perl/5.14 installiert?
Habt ihr sowas auf einem Debianserver mal gehabt?
Last edited: 2013-12-13 20:07:29 +0100 (CET)