[EMAIL PROTECTED] wrote:
> 
> Mark Berryman wrote:
> 
> !If the files are supposed to be in the kit, then they are missing.  They
> !are not in the Tar file.  I unpacked the Tar file on a Unix system and
> !got the same result.
> !
> !Observe the following:
> !
> !> pwd
> !/export/home/berryman/perl-5.8.1-RC3/ext/Encode
> !> grep -i byte MANIFEST
> !Byte/Byte.pm    Encode extension
> !Byte/Makefile.PL       Encode extension
> !> ls Byte
> !Byte.pm      Makefile.PL
> 
> Yes - my mistake.  Files like byte_t.h do not ship
> with the perl kit.  Rather they are built during
> the "perl Makefile.PL" step that occurs for the Encode
> extension at mmk time.  (strictly speaking it looks
> like it occurs for the "perl Makefile.PL" step done
> for [.ext.encode.byte]).
> 
> !Also:
> !tar -tf perl-5_8_1-rc3.tar | grep -i _t.h
> !
> !returns no results.
> !
> !I fetched my kit from:
> !http://www.cpan.org/authors/id/J/JH/JHI/perl-5.8.1-RC3.tar.gz
> 
> How does the build fair on Unix for you?  I got RC3 to build on VMS
> using DEC C  S6.5-002, VMS 7.3-1, on an ODS-2 volume.  I obtained
> three test failures during a run of "mmk test".
> 
> What happens if you temporarily define your perl_root
> to point to the build directory then you issue:
> 
>    set def [.ext.encode.byte]
>    perl Makefile.PL
>    mmk

No difference.

> Are there any helpful error messages generated?

None whatsoever.

However, I did manage to track down the problem.  Here are the
variables:

First, the command line:
MCR [---]miniperl.exe  [-.bin]enc2xs -"Q" -"O" -o BYTE_T.C -f byte_t.fnm

Second, DECC$ARGV_PARSE_STYLE is defined.  This logical removes the need
to quote mixed-case or uppercase arguments to C programs on VMS.

Third, the following check in [.EXT.ENCODE.BIN]ENC2XS.:
if ($cname =~ /\.(c|xs)$/)

So, with the logical name defined, the filename BYTE_T.C was not
converted to lowercase but the code only accepted the file as a C file
if the extension was lowercase.  Bad code.  Bad.  Bad.

So, I made the obvious one-letter edit and the build succeeds without
error.  At line 162 of enc2xs. change:
if ($cname =~ /\.(c|xs)$/)
to
if ($cname =~ /\.(c|xs)$/i)

The build then continued until near the end where I encountered two more
errors.  A filename check exists in both the files POD2USAGE.PL and
PODSELECT.PL and reads as follows (beginning at line 18):

($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$// if ($^O eq 'os2' or $^O eq 'dos');  #
"case-forgiving"
$file =~ s/\.pl$/.com/ if ($^O eq 'VMS');              #
"case-forgiving"

If Perl sees the filename as "something.PL", the first check will change
it to "something" and render the 2nd check superfluous for os2 and dos. 
However, it also breaks the VMS check since the .PL is no longer present
to match against.

If, however, the file is seen as "something.pl" then the first check is
a no-op, the second check changes it to "something" for os2 and dos and
the 3rd check changes it to "something.com" for VMS.

Why not make it read as follows:

($file = basename($0)) =~ s/\.PL$//i;
$file .= '.COM' if ($^O eq 'VMS');

This strips the .pl extension for all platforms, regardless of case, and
appends a .COM back on for VMS.  Same net result unless there is an
instance where you want .PL stripped but not .pl.

Any chance of any of these changes being made official?

Mark Berryman

Reply via email to