> I'd even go so far as to say that the current -X syntax should be
> _extended_, to allow for multiple tests at once, maybe by way of a
> leading caret (mnemonic "all"):
> 
>         -^rwx; # $_ is readable, writable and executable
> 
>         ($size, $mod, $acc, $ichange) = -^sMAC;

In fact, you wouldn't even need a caret, since all file tests are a
single letter. Just like grouping s/// flags, we should make file tests
groupable as well:

   if ( -drwx /usr/local and ! -h /usr/local ) {
      # directory exists and has correct perms
   }

> And, as the filetest operators currently rely solely on the unix-ish mode
> and uid/gid of the file, there should be a pragma that you can use to
> force the interpretation to be "true", i.e., modulo ACLs, readonly
> filesystems, etc., maybe
> 
>         use filetest true;

This is a good idea, I think.

The more I look at the RFC, the less enamoured I am with the original
suggestion, which came from Tom's perl6storm email. "Learn Perl" comes
to mind. As Bart notes, short is good, and -r makes just as much/little
sense as s/// for non shell-people. We shouldn't be trying to make Perl
into Pascal - beginner-friendly but shitty.

-Nate

Reply via email to