From: David Landgren Date: Tue, 5 Jun 2007 23:21:40 +0000 (+0200) Subject: Re: [PATCH] Update File-Path to 2.00 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1158ce344e6265a869b839cb74dfea1138fd2130;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Update File-Path to 2.00 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 --- diff --git a/lib/File/Path.pm b/lib/File/Path.pm index ad0a38d..6e1a17b 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -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; } diff --git a/lib/File/Path.t b/lib/File/Path.t index ce85b73..055fc46 100755 --- a/lib/File/Path.t +++ b/lib/File/Path.t @@ -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" );