Doug MacEachern wrote:

> On Mon, 17 Sep 2001, Stas Bekman wrote:
> 
> 
>>I was wondering whether it'd be better to use File::Path::mkpath in 
>>genfile and gendir so the test writers won't have to call this sub many 
>>times if they need to create a dir foo/bar/baz or a file 
>>foo/bar/baz/test.conf, when foo doesn't exist. Of course in this case 
>>the cleanup code should use File::Path::rmtree. If you think it's cool, 
>>I'll send a patch.
>>
> 
> +1 for s/mkdir/mkpath/ in both gendir and t_mkdir.  however, the cleanup
> code intentionally does not use rmtree.  it carefully removes generated
> files first (created via genfile), then only removes the generated
> directories if they are empty.  i don't think rmtree provides that
> functionality.
> also, switching to gendir to use mkpath will require you to add each
> subdirectory created to $self->{clean}->{dirs}


Yes, I'm aware of that. And that's exactly what I've planned to do. 
It'll be somewhat slower than mkpath, but not slower than the current 
code, and will take away from the test writer the mess of doing all this 
work.



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to