Re: RFC 14 (v2) Modify open() to support FileObjects and
[email protected] (Nick Ing-Simmons) Mon, 7 Aug 2000 17:40:27 +0100 (BST)
| Newsgroups | perl.perl6.language.io |
|---|---|
| Organization | via, but not speaking for : Texas Instruments Ltd. |
| Message-ID | <[email protected]> |
Perl6 Rfc Librarian <[email protected]> writes: > > $class - The class from which to load the appropriate file > methods, the default being an optimized IO::File. It is far from clear that having user specify the class as an input is always the right thing to do. I don't like the idea of zillions of perl6 scripts getting hard-coded IO::File when we decide to change the class hierachy in perl6.2. Given that this now to be "internal" in some sense, perhaps it is appropriate for perl to look at what it just opened and set the class accordingly - i.e. if you open a disk file you get something IO::File-ish, if you open a directory you get something IO::Dir-ish, a named pipe you get something where seek() either dies or does sfio-like fake seek of shadow buffer and a "tty" could have extra methods to give access to stty(1) like things. -- Nick Ing-Simmons <[email protected]> Via, but not speaking for: Texas Instruments Ltd.