This queue is for tickets about the ExtUtils-Install CPAN distribution.

Report information
The Basics
Id:
46811
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
bdfoy [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Wishlist
Broken in:
1.52
Fixed in:
(no value)



Subject: Use the octal presentation for mode in messages from _chown
I thought it was odd to see warnings from _chmod that turned the mode into base-10: WARNING: Failed chmod(438, C:\strawberry\perl\lib\CPAN\FirstTime.pm): Permission denied I modified _chmod a bit to use the octal representation in the messages: diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index d8f325a..03c92f3 100755 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -134,11 +134,14 @@ sub _choke(@) { sub _chmod($$;$) { my ( $mode, $item, $verbose )=@_; $verbose ||= 0; + + my $mode_oct_string = sprintf "0%o", $mode; + if (chmod $mode, $item) { - print "chmod($mode, $item)\n" if $verbose > 1; + print "chmod($mode_oct_string, $item)\n" if $verbose > 1; } else { my $err="$!"; - _warnonce "WARNING: Failed chmod($mode, $item): $err\n" + _warnonce "WARNING: Failed chmod($mode_oct_string, $item): $err\n" if -e $item; } }
Subject: mode_string.patch
diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index d8f325a..03c92f3 100755 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -134,11 +134,14 @@ sub _choke(@) { sub _chmod($$;$) { my ( $mode, $item, $verbose )=@_; $verbose ||= 0; + + my $mode_oct_string = sprintf "0%o", $mode; + if (chmod $mode, $item) { - print "chmod($mode, $item)\n" if $verbose > 1; + print "chmod($mode_oct_string, $item)\n" if $verbose > 1; } else { my $err="$!"; - _warnonce "WARNING: Failed chmod($mode, $item): $err\n" + _warnonce "WARNING: Failed chmod($mode_oct_string, $item): $err\n" if -e $item; } }
This is in 1.52_02, please try it out.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.