On Fri, Nov 21, 2008 at 11:46:48AM -0800, dpuu wrote:
: before I attempt to change the POD, would this wording be appropriate?
It's a good first whack, though we might want to think about making
it a little less P5ish/Unixish in changing a list of files, and rely
instead of one of P6's distribution mechanisms, such as hypers or maps:
my @status = @files».io».chmod($mode);
my @status = map { .io.chmod($mode) }, @files;
my @status = (for @files { .io.chmod($mode) });
The advantage of this approach is that you don't get complete failure
if only one of the files failed to change. Any you could even do it
in parallel:
my @status = hyper map { .io.chmod($mode) }, @files
though it's possible your sysadmin will complain about what you're
doing with the disk drive heads. :)
Of course, along with the methods we could also provide the old-fashioned
functions so that someone can write a FAQ telling people not to use them. :)
It's also possible that «*.c *.h».io.chmod($mode) should do something
dwimmy, given «...» is defined as "shell quoting". And maybe IO
objects themselves can track multiple files, similar to how we can
turn @*ARGS into a single abstract file handle.
Larry