Gisle Aas wrote on 01.7.21 9:55 AM:
>KIMURA Takeshi <[EMAIL PROTECTED]> writes:
>
>> Gisle Aas wrote on 01.7.19 8:10 PM:
>> > The module failed on perl5.004 because \z is not supported
>> > in regexps. The Makefile.PL will now try to patch the module
>> > to be compatible.
>>
>> Glad to have perl5.004 support!
>>
>> It is a pity that MacPerl application does not support system()
>> function.
>
>Learn something every day.
>
>> Wish if the Makefile.pl done in pure perl.
>
>I'm willing to apply if you (or somebody else) come up with a patch.
I don't have a good diff & patch tool, so I'll send the whole thing.
Hope this works on other platforms too.
--- Makefile.PL ---
require 5.004;
use ExtUtils::MakeMaker;
if ("foo" !~ /\Afoo\z/) {
print "\\z not supported by this perl. Fixing URI.pm...\n";
rename( 'URI.pm', 'URI.pm.bak' ) || die;
open( IN, '<URI.pm.bak' ) || die;
open( OUT, '>URI.pm' ) || die;
while( <IN> ) {
$_ =~ s/\\z/\\Z/g;
print OUT;
}
close( OUT );
close( IN );
}
WriteMakefile(
'NAME' => 'URI',
'VERSION_FROM' => 'URI.pm',
'PREREQ_PM' => {
'MIME::Base64' => 2,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
);
--- Makefile.PL ---
--
Takeshi