# from Eric Wilhelm
# on Monday 01 October 2007 03:16:
>prefix usr/usr
> (Isn't this just a Config/user error?)
> http://rt.cpan.org/Ticket/Display.html?id=19951
It looks like this is in fact a problem whenever "--prefix
$(perl -MConfig -e 'print $Config{siteprefix}')" (or roughly so.) On
my debian etch machine, I can reproduce this with --prefix /usr/local.
The code in question "fallthrough if $sprefix eq $rprefix" has been
there since r5525. Randy, is that just an accident? AFAICT, The
fall-through-if-eq logic means that the calling chain
(install_destination, prefix_relative, _prefixify -- but namely the
ternary in prefix_relative) doubles-up the prefix (whereas a path
starting with (but not equal to) $sprefix hits the substition elsif.)
Further, the substition elsif seems to be doing the right thing and
should be inclusive of the eq case. i.e. If nothing else, the eq case
should return '/' so-as not to cause the ternary in prefix_relative()
to see it as false.
Admittedly, this calling chain is a bit more complicated than it needs
to be, and yes, PREFIX is a convoluted thing. But, the long and short
of it is that we're not doing what ExtUtils::MakeMaker does here and
are therefore incorrect (because that's the whole point of --prefix
support, right?)
So, feedback would be lovely. Otherwise I'll delete those two lines and
close this bug.
Thanks,
Eric
--
software: a hypothetical exercise which happens to compile.
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------