On 26 Sep 2000, Perl6 RFC Librarian wrote:
> =head1 TITLE
>
> Allow grouping of -X file tests and add C<filetest> builtin
Nice summary. Thanks.
> =head1 IMPLEMENTATION
>
> This would involve making C<-[a-zA-Z]+> a special token in all contexts,
> serving as a shortcut for the C<filetest> builtin.
>
> =head1 MIGRATION
>
> There is a subtle trap if you are negating subroutines:
>
> $result = -drwx $file;
>
> And expect this to be parsed like this:
>
> $result = - &drwx($file);
>
> However, usage such as this is exceedingly unlikely, and can simply be
> resolved by the p52p6 translator looking for C<-([a-zA-Z]{2,})> and
> replacing it with C<- $1>, since injecting a single space will break up
> the token.
I can't believe that special-casing the token -[rwxoRWXOezsfdlpSbctugkTBMAC]+
is an acceptble solution. I mean think of all the existing perl keywords
that that already matches: -pos, -cos, -lc, -uc, -fork, -use, -pop, -exp,
-oct, -log, -ord + others!. A lot of these already have a legitimate
not-filetest meaning, others not :-) So it still seems to me that some
sort of disambiguating syntax is needed, if not actually findable, to
save this filetest grouping idea of mine from the scrap heap. I guess
the p5-to-p6 converter could still resolve this as you stated, but I just
don't like it...
John.