http://qs321.pair.com?node_id=309200


in reply to Re: rename 0.3 - now with two extra cupholders
in thread rename 0.3 - now with two extra cupholders

Ok, that's simple to fix.. another thing I often found myself minorly annoyed with is that I have to make sure all directories any files might end up in exist beforehand. So requesting path autocreation for files is going to be a feature in the next time version.

Makeshifts last the longest.

  • Comment on Re^2: rename 0.3 - now with two extra cupholders

Replies are listed 'Best First'.
Re: Re^2: rename 0.3 - now with two extra cupholders
by parv (Parson) on Nov 23, 2003 at 00:42 UTC

    If the requested path is "/some/where/else", and only "/some" exists, would you create "where/else" or just "else"?

    How would you go about this: on failure of simple "mkdir()" would you run "File::Path:mkpath()" (or similar) or just run "File::Path::mkpath()" in the first place?

      Just mkpath everything, no need to check. If the path already fully exists, mkpath will just fail harmlessly.

      Makeshifts last the longest.