NAME

Tie::FileHandle::Base - a base class to simplify filehandle tie module implementation

DESCRIPTION

By noting the redundancies inherent in the filehandle tie methods, this module seeks to aid in implementation of new modules by reducing the number of required functions.

Care should be taken by classes that use AUTOLOAD. Make sure to predeclare subroutines that will be autoloaded - as in:

 sub PRINT;

Otherwise this module will make incorrect presumptions and your module will not function as you intend.

OUTPUT FUNCTIONS

Since PRINT, PRINTF, and WRITE are all quite similar in scope, any one of these can be implemented from any of the others. So, you only need implement one of the above.

INPUT FUNCTIONS

By implementing READ or GETC, you can get the entire complement of READ, READLINE, and GETC. Note however that READ and GETC cannot be derived nicely from READLINE.

OTHERS

EOF can be implemented crudely if given READ or GETC along with a backwards supporting SEEK.

HISTORY

  • 03/09/02 - Robby Walker - did the output stuff - version 0.1

  • 02/13/02 - Robby Walker - created the file - version 0.001

METHODS

PRINT

Implements PRINT based on WRITE or PRINTF.

PRINTF

Implements PRINTF based off of PRINT, which may in turn base itself off of WRITE.

WRITE

Implements WRITE based off of PRINT, which may in turn base itself off of PRINTF.

GETC
READ
READLINE
EOF

Crude EOF implemented using READ and SEEK.

TODO

  • Input stuff.

  • test.pl

BUGS

This is a new module and has not been thoroughly tested.

AUTHORS AND COPYRIGHT

Written by Robby Walker ( robwalker@cpan.org ) for Point Writer ( http://www.pointwriter.com/ ).

You may redistribute/modify/etc. this module under the same terms as Perl itself.