Subject: | May default to systemwide scriptdir |
Perl's Configure script prefers to set the default value for scriptdir
to a directory in /usr/share/... or /usr/local/... if possible,
presumably to support reuse of architecture-independent scripts. When
perlbrew configures the build, unless scriptdir has been specified via a
-[DA] switch, scriptdir will be set to a location outside $prefix if a
"suitable" directory exists. This means that many of the support
scripts from the Perl distribution (and later modules) will either be
installed outside the home of the brewed Perl, or fail to install if
scriptdir isn't writeable. (If it is writeable, one ends up with the
only slightly less problematic situation that the last installed perl
overwrites any prior versions, and since most scripts' shebang points to
a particular version of perl, perlbrew switch doesn't really work all
that well.)
If one is "lucky" enough to have one of Configure's preferred scriptdir
defaults present on one's system, it is possible to work around the
problem by saying
perlbrew install $version '-Aeval:scriptdir="$prefixexp/bin"'
It might be nice if, for the sake of encapsulation, perlbrew did
something like this by default.