[guest - Mon Dec 15 01:32:53 2003]:
But I don't think dir_target() really did what Command.pm's chmod does, which is:
sub chmod {
local @ARGV = @ARGV;
my $mode = shift(@ARGV);
expand_wildcards();
chmod(oct $mode,@ARGV) || die "Cannot chmod ".join(' ',$mode,@ARGV).":$!";
}
When you expand wildcards you are really taking the directory spec as a pattern, which
expands to nothing if the directory is empty, as is the case with the blibdirs target, or
gives you the contents of the directory (but not the directory itself) if the directory is not
empty.
$ perl -e "print '>' . glob('[.foo]') . '<';"
Show quoted text><
$ create [.foo]test.fil
^Z
$ perl -e "print '>' . glob('[.foo]') . '<';"
Show quoted text>d0:[craig.foo]test.fil<
One approach might be to add something like this to Command.pm's chmod:
@ARGV = map( -d $_ ? vmsify(fileify($_)) : $_, @ARGV) if $Is_VMS;
but even here we assume macro expansion has already been done.