Mailing List Archive

Re: ^HANDLE: It will parse after all
Sorry for the delay; I've been very busy...
... But it seems that Charles Bailey has given new life to ^FH.

According to Charles Bailey:
> Chip Salzenberg writes:
> > Consider "$a=$b". If =FORMAT is in the language, then that statement
> > is a syntax error ...
>
> Hmm. Why? C<$c=$a&$b> is parsed using the binary operator &, not a call to
> &$b. This seems to be just another instance of the behavior Larry Wall
> described -- the lexer knows when to expect an op and when to expect a term,
> and parses correspondingly.

I see. You're right -- I should have tested first.

> As long as there's an anonymous(IO), and a way to override routines like
> CORE::open(), we can accomplish all of the tasks described so far.

Yup.

> Of course, every call to C<print> is gonna incur an @ISA traversal if
> we decide that the way to make a class I/O-capable is to have it inherit
> from FileHandle.

Naw -- caching is a wonderful thing. :-)
--
Chip Salzenberg, aka <chs@nando.net>
"Hey, it's the Miss Alternate Universe Pageant!"
-- Crow T. Robot, MST3K: "Stranded In Space"