RFC 290 (v1) Remove -X
[email protected] (Perl6 RFC Librarian) 25 Sep 2000 06:02:51 -0000
| Newsgroups | perl.perl6.announce.rfc,perl.perl6.language |
|---|---|
| Message-ID | <[email protected]> |
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Remove -X =head1 VERSION Maintainer: Adam Turoff <[email protected]> Date: 24 Sep 2000 Mailing List: [email protected] Number: 290 Version: 1 Status: Developing =head1 ABSTRACT File tests (-r/-w/-x/...) made sense when Perl's shellness was an attribute. Most new Perl programmers are not coming from a shell programming background, and the -X syntax is opaque and bizarre. It should be removed. =head1 DESCRIPTION Tom Christiansen proposed this in his perl6storm message: =item perl6storm #0101 Just like the "use english" pragma (the modern not-yet-written version of "use English" module), make something for legible fileops. is_readable(file) is really -r(file) note that these are hard to write now due to -s(FH)/2 style parsing bugs and prototype issues on handles vs paths. Aside from providing parsing bugs and prototype issues, the -X syntax is strange and confusing to many Perl programmers who are completely unfamiliar with Bourne shell syntax. The prefered mechanism for file tests should be more legible, using terms like 'readable(FOO)' and 'writeable(FOO)' instead of the opaque '-r FOO' and '-x FOO'. Furthermore, these tests should remain useable where appropriate on any I/O mechanism, not just files. =head1 MIGRATION ISSUES p52p6 would convert instances of -X to the appropriate legible test. Perl programmers happy with the -X syntax will need to get used to the lengthier replacement. =head1 IMPLEMENTATION None required. =head1 REFERENCES perl6storm