bug #1

SYNOPSIS says:

perl -MExtUtils::Command -e chmod mode files...

but ExtUtils::Command::chmod is not exported, so the Perl's built-in chmod is called, without any arguments and it happily returns without doing anything and without warning anybody.

---

bug #2, the doc says:

Sets UNIX like permissions 'mode' on all the files.

the mode is something like 0666, though you have to eval the string "0666" as an octal number before passing it to chmod()

---

finally I've added an example to the doc, to avoid confusion of what kind of mode is expected.

here is the fix against distro 6.05

--- lib/ExtUtils/Command.pm.old 2002-06-14 06:00:15.000000000 +1000
+++ lib/ExtUtils/Command.pm 2003-02-01 22:31:25.000000000 +1100
@@ -10,7 +10,7 @@
require Exporter;
use vars qw(@ISA @EXPORT $VERSION);
@ISA = qw(Exporter);
-@EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f);
+@EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath chmod touch test_f);
$VERSION = '1.04';

my $Is_VMS = $^O eq 'VMS';
@@ -173,7 +173,7 @@

=item chmod mode files...

-Sets UNIX like permissions 'mode' on all the files.
+Sets UNIX like permissions 'mode' on all the files. e.g. 0666

=cut

@@ -181,7 +181,8 @@
{
my $mode = shift(@ARGV);
expand_wildcards();
- chmod($mode,@ARGV) || die "Cannot chmod ".join(' ',$mode,@ARGV).":$!";
+ chmod(oct($mode), @ARGV)
+ || die "Cannot chmod ".join(' ',$mode,@ARGV).":$!";
}

=item mkpath directory...


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to