On Tue, Apr 02, 2002 at 06:04:39AM +0900, Dan Kogai wrote:
> On Tuesday, April 2, 2002, at 05:43 , Jarkko Hietaniemi wrote:
> > On Mon, Apr 01, 2002 at 02:38:46PM -0600, Craig A. Berry wrote:
> >> This is a not entirely portable revision of a completely unportable 
> >> method
> >> of determining whether enc2xs is being run during a core build, but it 
> >> does
> >> allow the build to proceed on VMS.  Can't the extensions that use 
> >> enc2xs
> >> pass it a parameter of PERL_CORE=$(PERL_CORE) or similar?
> >>
> >> --- ext/Encode/bin/enc2xs;-0    Sun Mar 31 15:05:56 2002
> >> +++ ext/Encode/bin/enc2xs       Mon Apr  1 14:20:56 2002
> >> @@ -1,7 +1,7 @@
> >>  #!./perl
> >>  BEGIN {
> >> -    # fiddle with @INC iff I am a part of perl dist
> >> -    if ($^X =~ m/\bminiperl$/o){
> >> +    # fiddle with @INC if I am a part of perl dist
> >> +    if ($^X =~ m/miniperl(?:\.exe\;\d+)?$/o) {
> >
> > Ahhh, this is what probably tripped cygwin, too.  $Config{_exe} would
> > be more portable than .exe.
> 
> Thank you folks.  How about the one below ?  Does it look
> 
> --- bin/enc2xs  2002/03/31 21:00:50     1.10
> +++ bin/enc2xs  2002/04/01 20:59:58
> @@ -1,7 +1,8 @@
>   #!./perl
>   BEGIN {
>       # fiddle with @INC iff I am a part of perl dist
> -    if ($^X =~ m/\bminiperl$/o){
> +    require Config; import Config;
> +    if ($^X =~ m/\bminiperl$Config{_exe}$/){

As Schwern pointed out, none of this should be necessary, if the
Encode $ENV{PERL_CORE} changes he sent are applied. (This, of course,
will require revisiting when and if Encode is backported to older
Perls, but that's VERY post-5.8 worry.)

>          warn "Fixing \@INC for perl core.\n";
>          unshift @INC, qw(../../lib ../../../lib ../../../../lib);
>          $ENV{PATH} .= ';../..;../../..;../../../..' if $^O eq 'MSWin32';
> 
> Dan the Encode Maintainer

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Reply via email to