develooper Front page | perl.perl5.porters | Postings from May 2008

Re: File::Path::mkpath() incompatiblity in perl-5.10

Thread Previous | Thread Next
From:
Gisle Aas
Date:
May 8, 2008 09:21
Subject:
Re: File::Path::mkpath() incompatiblity in perl-5.10
Message ID:
82BECBA1-91A6-4DA4-AF3F-B540F6183BD3@activestate.com
On May 8, 2008, at 11:49, David Landgren wrote:
>
> @@ -57,7 +58,7 @@
>          UNIVERSAL::isa($_[0],'ARRAY')
>          or (@_ == 2 and (defined $_[1] ? $_[1] =~ /\A\d+\z/ : 1))
>          or (@_ == 3
> -            and (defined $_[1] ? $_[1] =~ /\A\d+\z/ : 1)
> +            and (defined $_[1] ? $_[1] =~ /\A\d*\z/ : 1)
>              and (defined $_[2] ? $_[2] =~ /\A\d+\z/ : 1)
>          )
>      ) ? 1 : 0;

I don't find it unreasonable that there exist code used to call the  
mkpath() function like this:

     mkpath($dir, "verbose", 0755)

Making this code now create directories called "verbose" and "493" is  
just wrong.

--Gisle


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