SPUG: Re: Using mkpath

Yitzchak Scott-Thoennes sthoenna at efn.org
Sun Mar 3 12:24:31 CST 2002

In article <001201c1c189$12e32180$1a88ddd1 at aciwin>,
"Richard Anderson" <richard at richard-anderson.org> wrote:
>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.

Fair enough.  (Though it seems to me that would only happen with a disk
filling up between making paths--or as a race condition).

>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.

Depends.  The throw-exception model of error reporting is not one I
prefer, but that's a matter of taste.

I *think* mkpath originated for installing perl and modules.
In that case, croaking on errors is an appropriate response.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     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