On Sun, Jul 18, 2004 at 05:36:58PM -0700, Dave Whipp wrote:

> truncate Vs append would be infered from usage (assign => truncate). One
> might be able to infer read Vs write in a similar way -- open the file based
> on the first access; re-open it (behind the scenes) if we write it after
> reading it.

You might run into issues if the user starts doing seeks before
writing...although maybe not, since that just means that we need to
(behind the scenes) remember the current location of the seek pointer
when re-opening.

Exclusivity issue: when it re-opens, should it lock before opening?  

Race condition: what if something deletes the file between the moment
that perl closes the file and the moment that it re-opens it?  Is
there a cross-platform way to do an atomic reopen?


FWIW, although I'm not sure it will work in practice, I really like
this idea of eliminating FileHandles as a user-level object.


> my Str $text is file("foo.txt") does no_follow_symlink does no_create;
> 
> Do we have an antonym for C<does>?

How about 'no'?

    my Str $text is file("foo.txt") no follow_symlink no create;

Other options (not all good):

without
not
dont
doesnt


--Dks

Reply via email to