Skip Menu |

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

Report information
The Basics
Id: 42605
Status: rejected
Priority: 0/
Queue: File-Copy-Recursive

People
Owner: Nobody in particular
Requestors: FischerR.External [...] infineon.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: <dmuey [...] cpan.org>
Subject: Mismatch between perldoc and implemenation
Date: Wed, 21 Jan 2009 10:58:37 +0100
To: <bug-File-Copy-Recursive [...] rt.cpan.org>
From: <FischerR.External [...] infineon.com>
(This applies to File::Copy::Recursive version 0.36) (1) From the perldoc: pathmk() Creates a given path recursively. Creates foo/bar/baz even if foo does not exist. File::Copy::Recursive::pathmk('foo/bar/baz') or die $!; An optional second argument if true acts just like $File::Copy::Recursive::NoFtlPth, which means you'd never get your die() if something went wrong. Here we have a contradiction. The example pathmk('...') or die; suggests that pathmk (when called with only one argument) returns false on failure, while the next sentence says that pathmk throws an exception on failure. In fact, pathmk is *implemented* in that way that it returns false on failure, but does not throw an exception. I verified this on Windows by trying to create a path on a non existent drive: perl -le "use File::Copy::Recursive qw(pathmk); pathmk('X:/foo/bar') or print 'fail'" prints "fail" - no die() executed. (2) The perldoc also says: AUTHOR Daniel Muey, <http://drmuey.com/cpan_contact.pl> This website does not exist (404 file not found)
thank you, for some reason I didn't get notified of this. Will be addressed soon :)
Seems to work as advertised, granted it is a bit confusing but that will be moot in the upcomgin "modern rewrite" $perl -MFile::Copy::Recursive=pathmk -le 'print pathmk("tmp/test_howdy/foo");print "I am here: $!";' I am here: Permission denied $ perl -MFile::Copy::Recursive=pathmk -le 'print pathmk("tmp/test_howdy/foo",1);print "I am here $!";' 1 I am here: Permission denied