SPUG: Re: Using mkpath

Richard Anderson richard at richard-anderson.org
Fri Mar 1 19:24:52 CST 2002


Well, we've probably beaten this to death, but since you mentioned it the
File::Path::mkpath documentation is NOT accurate.  The documentation says
"It [mkpath] returns a list of all directories ... created."  In fact, if
mkpath encounters a permissions problem, etc. it does NOT return a list of
directories, it throws a runtime error and the calling routine never gets
the list of directories.

I'm indulging in whining here, but I can't help but observe that the
implementation of mkpath goes against common sense.  The authors compounded
their error by documenting the module incorrectly.

Cheers,
Richard
richard at richard-anderson.org
www.richard-anderson.org
www.raycosoft.com
----- Original Message -----
From: "Yitzchak Scott-Thoennes" <sthoenna at efn.org>
To: <spug-list at pm.org>
Cc: <richard at richard-anderson.org>
Sent: Friday, March 01, 2002 1:05 PM
Subject: Re: SPUG: Re: Using mkpath


> In article <20020301114353.B18677 at hobart.helvella.org>,
> Colin Meyer <cmeyer at helvella.org> wrote:
> >On Fri, Mar 01, 2002 at 10:59:55AM -0800, Richard Anderson wrote:
> >> Thanks for the correction.  Since File::Path is part of the standard
Perl
> >> distribution and is five years old, I would have expected accurate
> >> documentation.  Perhaps I should have looked elsewhere than "perldoc
>
> >> File::Path"?  Is this (I hope) an aberration or are module users
expected to
> >> scan the source code before using a module?
>
> I don't seem to have received the above post from the list.
> Is there an archive somewhere?
>
> Anyway, the documentation is terse but accurate.  It just doesn't
> mention error conditions at all.  It says it returns a list of the
> created directories.
>
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
>       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
>   Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
>  For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
>      Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
>
>
>


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org





More information about the spug-list mailing list