develooper Front page | perl.libwww | Postings from July 2001

Re: URI-1.15

Thread Previous | Thread Next
From:
KIMURA Takeshi
Date:
July 25, 2001 00:18
Subject:
Re: URI-1.15
Message ID:
20010725071844.10020@mail.watanabe.arch.waseda.ac.jp
Gisle Aas wrote on 01.7.21 9:55 AM: 
>KIMURA Takeshi <kim@ga2.so-net.ne.jp> 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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About