This queue is for tickets about the File-Path CPAN distribution.

Report information
The Basics
Id:
45080
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
dland [...] cpan.org
Requestors:
jmason [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
2.04
Fixed in:
(no value)



Subject: Please document API changes better
hi -- The POD documentation regarding the 'modern way' of calling mkpath doesn't indicate that is is unsupported on relatively-recent releases of perl which bundle the module: machine1$ perl -MFile::Path -e 'print $File::Path::VERSION."\n"; mkpath("foo", "bar")'; ls -ld foo bar 2.04 drwxrwxr-x 2 jmason jmason 4096 Apr 16 10:37 bar drwxrwxr-x 2 jmason jmason 4096 Apr 16 10:37 foo machine2$ perl -MFile::Path -e 'print $File::Path::VERSION."\n"; mkpath("foo", "bar")'; ls -ld foo bar 1.08 ls: bar: No such file or directory drwxr-xr-x 2 build build 4096 Apr 16 11:37 foo machine2 is running 5.8.8. IMO, it would be very beneficial to add a line to the POD indicating the File::Path version at which this API format was added, particularly given that this produces buggy behaviour at runtime without inducing a warning or error.
On Thu Apr 16 06:48:03 2009, JMASON wrote:
Show quoted text
> hi -- > > The POD documentation regarding the 'modern way' of calling mkpath > doesn't indicate that is is unsupported on relatively-recent releases > of perl which bundle the module: > > > machine1$ perl -MFile::Path -e 'print $File::Path::VERSION."\n"; > mkpath("foo", "bar")'; ls -ld foo bar > 2.04 > drwxrwxr-x 2 jmason jmason 4096 Apr 16 10:37 bar > drwxrwxr-x 2 jmason jmason 4096 Apr 16 10:37 foo > > machine2$ perl -MFile::Path -e 'print $File::Path::VERSION."\n"; > mkpath("foo", "bar")'; ls -ld foo bar > 1.08 > ls: bar: No such file or directory > drwxr-xr-x 2 build build 4096 Apr 16 11:37 foo > > machine2 is running 5.8.8. > > IMO, it would be very beneficial to add a line to the POD indicating the > File::Path version at which this API format was added, particularly > given that this produces buggy behaviour at runtime without inducing a > warning or error.
Dear Justin, the experiment to shoehorn old/new semantics onto mkpath() (and rmtree()) is deemed a failure. As of 2.08, mkpath() has identical semantics to 1.x mkpath(). The new behaviour is only available with make_path(). This removes all possible ambiguity. The only exception is that a final hashref parameter as an argument to mkpath() and rmtree() is an unambigous signal from the client indicating that new semantics are expected. I humbly apologise for all the grief that this caused. Regards, David


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.