develooper Front page | | Postings from December 2012

Re: How To Build A Perl Package Database

Thread Previous | Thread Next
Jan Dubois
December 31, 2012 17:50
Re: How To Build A Perl Package Database
Message ID:
On Fri, Dec 28, 2012 at 4:18 PM, Leon Timmermans <> 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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About