The open() function doesn't provide for security, sharing modes, and lots of OS-specific hints and modes.
I remember the (pre-standard) C language adding an sopen that took sharing-mode parameters, but that isn't elegant.
I think what Perl needs, in the spirit of Perl, is text-based options inside the filename parameter, just like the cool stuff that's there already. As well as > < | & and whatever else, it could take platform-dependant flags, too.
So if we use ++>> as the delimiter, perhaps open (FH, "<foo.out ++>> sequential) would be used to indicate that the file was going to be used for sequential access (not random access) if that "hint" is possible to the underlying OS.
Since it's part of the string, I'm not too broken up about having platform-dependant stuff in there.
</muse>
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: open() enhancements
by RMGir (Prior) on Aug 21, 2002 at 19:53 UTC | |
by John M. Dlugosz (Monsignor) on Aug 21, 2002 at 20:00 UTC | |
by RMGir (Prior) on Aug 21, 2002 at 20:08 UTC | |
|
Re: open() enhancements
by tadman (Prior) on Aug 21, 2002 at 22:02 UTC | |
by John M. Dlugosz (Monsignor) on Aug 22, 2002 at 23:40 UTC | |
by blakem (Monsignor) on Aug 23, 2002 at 02:27 UTC | |
by John M. Dlugosz (Monsignor) on Aug 23, 2002 at 02:32 UTC | |
|
Re: open() enhancements
by Aristotle (Chancellor) on Aug 21, 2002 at 21:12 UTC | |
|
Re: open() enhancements
by blakem (Monsignor) on Aug 22, 2002 at 09:36 UTC | |
|
Re: open() enhancements
by dada (Chaplain) on Aug 22, 2002 at 10:20 UTC |