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) {
warn "Fixing \@INC for perl core.\n";
unshift @INC, qw(../../lib ../../../lib ../../../../lib);
$ENV{PATH} .= ';../..;../../..;../../../..' if $^O eq 'MSWin32';