You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@cpan.org> on 2003/01/23 02:59:29 UTC

[mp1 Patch] perl Makefile.PL PREFIX=/foo/bar potentially broken

Just noticed that specifying PREFIX to perl Makefile.PL doesn't quite
work all the time. For example, under RH8.0 it doesn't work anymore,
because things are not installed in $PREFIX/lib/site_perl but
$PREFIX/lib/perl5/site_perl...

Anyways, there is $Config{'installstyle'} that knows.

Following patch fixes this.

Index: Makefile.PL
===================================================================
RCS file: /home/cvspublic/modperl/Makefile.PL,v
retrieving revision 1.203
diff -u -I'$Id' -I'$Revision' -r1.203 Makefile.PL
--- Makefile.PL	2 Jun 2002 02:34:12 -0000	1.203
+++ Makefile.PL	23 Jan 2003 01:54:08 -0000
@@ -347,7 +347,7 @@
     if ($k eq 'PREFIX') {
         require File::Spec;
         $MOD_PERL_PREFIX =
-          File::Spec->catfile($v, 'lib', 'site_perl',
+          File::Spec->catfile($v, $Config{'installstyle'}, 'site_perl',
                               $Config{'version'}, $Config{'archname'});
     }
 		




Re: [mp1 Patch] perl Makefile.PL PREFIX=/foo/bar potentially broken

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> Just noticed that specifying PREFIX to perl Makefile.PL doesn't quite
> work all the time. For example, under RH8.0 it doesn't work anymore,
> because things are not installed in $PREFIX/lib/site_perl but
> $PREFIX/lib/perl5/site_perl...
> 
> Anyways, there is $Config{'installstyle'} that knows.

Thanks, gozer, committed.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org