|
|
| go ahead... be a heretic | |
| PerlMonks |
Problem with make_path in File::Pathby Anonymous Monk |
| on Jul 20, 2012 at 16:12 UTC ( #982862=perlquestion: print w/ replies, xml ) | Need Help?? |
|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
Hey, The documentation states: "The make_path function creates the given directories if they don't exists before. Still, keeps on giving me plenty of "Couldn't create tmp dir: File exists". I even tried surrounding the whole thing with if (!-e $path) { ... }, but of course that doesn't help in case of a race condition, since several instances of the script are forked off in my code. But shouldn't make_path deal with this by default? I need to sit down and work through the "Error handling" part because I don't understand it yet, but will that help at all in my case, with several instances of the script all trying to create the directory before writing to it?
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||