New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File::Path::make_path dies under error conditions #15483
Comments
From the.rob.dixon@gmail.comCreated by the.rob.dixon@gmail.comSomething like $ perl -MFile::Path=make_path -e 'make_path q{/xxx}' will die with mkdir /xxx: Permission denied at -e line 1. I suggest that it should behave the same way as open: $ perl -E 'open ">", q{/xxx} or warn $!; say "But all's okay";' which produces No such file or directory at -e line 1. No doubt there is a lot of code out there that relies on the current Perl Info
|
From zefram@fysh.orgRob Dixon wrote:
Exception throwing is the superior way to signal errors. Wanting to
It's not a fix. If such an alternate interface were to be offered, it would be invoked -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Thu Jul 28 16:31:18 2016, the.rob.dixon@gmail.com wrote:
File-Path is "upstream cpan", so, strictly speaking, new feature requests should be reported via: bug-File-Path@rt.cpan.org Rich Elberger and I are the current maintainers. When we did a lot of maintenance work in 2015 we found out that -- yes, indeed -- there is a lot of code out there that depends on File::Path's current behavior. And there are a lot of people prepared to become very vocal about any changes to that behavior, even if the purpose of those changes is to rationalize inconsistencies among the module's three (!) different interfaces. Hence, even apart from the objections to this feature request such as those raised by Zefram in another post to this thread/RT, there are good reasons to reject this feature request. Moreover -- and here I speak only for myself and not for RICHE -- File-Path has acquired too many interfaces over the years and is incapable of evolving further in a rationale, consistent and well designed manner. Rather than trying to tack additional refinements onto File-Path, we should consider writing a new library -- starting first on CPAN -- that fulfills the same objectives as File-Path and could one day be shipped with Perl 5 core. Thank you very much. -- |
From rich@richelberger.comI agree with everything Jim has said here. Either a new one or File::Path::Tiny. There's just far too many dependencies on File::Path and Jim and I got burnt (and schooled) by trying to fix up many things last year. Having said that it might be worth gathering some of the techniques downstream modules have used to mitigate File::Path shortcomings and putting those in a pod in with the module distribution. -- rich
|
From the.rob.dixon@gmail.comThank you for your response.
- It's not the way the rest of Perl works. `open`, and more pertinently - If you want an exception on failure then the familiar idiom "or die" - `eval` is broken to the point that most people familiar with Perl - The non-core `File::Path::Tiny` is often preferred over the core
It is not for a core language module to go on a solo crusade for better Kind regards, Rob Dixon This email has been checked for viruses by Avast antivirus software. |
From zefram@fysh.orgRob Dixon wrote:
They come from Perl 4, where it wasn't feasible to use exceptions.
It's not a fix because there's nothing broken. Not only does the
It's rather fiddly to make such a parameter cause one of two different
It's far from solo. Exception throwing is generally the preferred way -zefram |
From J.X.BIRD@mdx.ac.ukTake me off this email list!! On 29/07/2016 13:50, "Rob Dixon" <the.rob.dixon@gmail.com> wrote:
|
From @tonycozOn Fri Jul 29 06:13:27 2016, jkeenan wrote:
Marking rejected. Tony |
@tonycoz - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#128767 (status was 'rejected')
Searchable as RT128767$
The text was updated successfully, but these errors were encountered: