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

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

Thread Previous | Thread Next
From:
David Landgren
Date:
May 15, 2008 10:50
Subject:
Re: File::Path::mkpath() incompatiblity in perl-5.10
Jan Dubois wrote:

>> So I'm thinking that the right things to do is to not croak and just
>> ignore the remaining directories in the list to be unlinked, and the
>> current directory remains changed.
> 
> I prefer to keep the croak.  Changing the working directory as an
> unintended side effect should be a fatal error:
> 
>     rmtree( '../../to' );
>     rmtree( 'here/too' );
> 
> How do you prevent the second rmtree() from removing the wrong tree?

Hmm. You don't. That's good enough for me.

Thanks,
David


Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About