Re: [PATCH] Update File-Path to 2.00
authorDavid Landgren <david@landgren.net>
Tue, 5 Jun 2007 23:21:40 +0000 (01:21 +0200)
committerSteve Hay <SteveHay@planit.com>
Wed, 6 Jun 2007 08:16:44 +0000 (08:16 +0000)
Message-ID: <4665D3E4.2030809@landgren.net>

Silences some unnecessary carping (e.g. from ExtUtils::Command line 109
when building perl).

p4raw-id: //depot/perl@31336

lib/File/Path.pm
lib/File/Path.t

index ad0a38d..6e1a17b 100644 (file)
@@ -502,7 +502,7 @@ sub rmtree {
             push @{${$arg->{error}}}, {'' => "No root path(s) specified"};
     }
     else {
-            _carp ("No root path(s) specified\n");
+            $arg->{verbose} and _carp ("No root path(s) specified\n");
         }
       return 0;
     }
index ce85b73..055fc46 100755 (executable)
@@ -252,7 +252,7 @@ and can't restore permissions to \d+
     $dir2 = catdir($base,'B');
 
     stderr_like(
-        \&rmtree,
+        sub { rmtree( [], 1 ) },
         qr/\ANo root path\(s\) specified\b/,
         "rmtree of nothing carps sensibly"
     );