In article <[EMAIL PROTECTED]>, Brandon S. Allbery KF8NH <[EMAIL PROTECTED]> wrote:
> File tests are supposed to return something which: > - behaves as a Bool > - stringifies as a filename > - numifies as a file size or as a time, if appropriate > - propagates a stat object (obviating perl5's magic _) > > Current Pugs only does the first three, sort of: the size and time > operators return numeric, the others string, all behave appropriately > if used as booleans. I'm not sure Pugs does that right. The file named "0" (zero) seems to behave inappropriately. In this example, "foo" and "0" are real files, and "not there" is not a file that exists: pugs> "foo" ~~ :e "foo" pugs> true "foo" ~~ :e Bool::True pugs> "not there" ~~ :e Bool::False pugs> true "not there" ~~ :e Bool::False pugs> "0" ~~ :e "0" pugs> true "0" ~~ :e Bool::False Again, I don't really mind whatever the answer is as long as I can document it. :)