develooper Front page | perl.module.build | Postings from December 2012

Re: How To Build A Perl Package Database

Thread Previous | Thread Next
From:
Jan Dubois
Date:
December 31, 2012 17:50
Subject:
Re: How To Build A Perl Package Database
Message ID:
CAD-TLz_Py=FgYjZTdoN64xD1fCfNNtszY_hGvgPnHAHrvpigJQ@mail.gmail.com
On Fri, Dec 28, 2012 at 4:18 PM, Leon Timmermans <fawaka@gmail.com> wrote:

> > Anyways, I just wanted to say that without putting some restrictions on
> how
> > modules (and corresponding scripts) can be installed, creating a package
> > manager would seem to get even more complex than ExtUtils::Makemaker...
> :)
>
> What kind of restrictions are you thinking about exactly?
>

Mostly I would prohibit sharing of directories between Perl installations,
and even within a single installation, the sharing of directories between
install locations.

E.g. the default configuration right now has $Config{installbin} and
$Config{installsitebin} pointing to the the same directory. This means that
if you install ExtUtils::ParseXS from CPAN, you end up with the new version
of the module in $Config{installsitelib}, but the xsubpp script installed
into $Config{installsitebin} will overwrite the core version already in
$Config{installbin} because they are the same directory.

This means it is now impossible to remove the ExtUtils::ParseXS module from
the "site" install location and reverting to the core version.

Even if you don't care about "delete" functionality in your package
manager, you may still want to preserve the integrity of core install.
Otherwise it is possible that the package manager updates a package it
relies upon itself that breaks the package manager. Then it is impossible
to fix this situation for a regular user without doing a complete reinstall
of Perl itself.

For this reason the ActivePerl package manager explicitly removes the
"site" directories from @INC and only uses the modules originally included
in the distribution.

Cheers,
-Jan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About