05 May 1997 18:17:35 UTC
- Distribution: perlrpcgen
- Source (raw)
- Browse (raw)
- How to Contribute
- KwaliteeBus factor: 0
- License: unknown
- Activity24 month
- Download (36.55KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Fstream - a class to encapsulate a filehandle as a stream;
Fstream wraps a filehandle and provides methods that make it easier to write a lexer. Why doesn't Perl have ungetc?
- new($filehandle, $name) Creates an Fstream object from $filehandle (a filehandle glob reference). $name is a string which is stored for debugging purposes and may be accessed with &name.
- getc Returns the next character in the stream, or the empty string if the stream has been exhausted.
- ungetc Pushes the last character read back onto the stream, where it will be returned on the next call to getc. You may only push one character back on the stream.
- lineno Returns the line-number of the stream (based on the number of newlines seen).
- name Returns the name that was given in the constructor.