NAME
blx::xsdsql::IStream - generic iterator for string,array,file descriptor or subroutine
SYNOPSIS
use blx::xsdsql::IStream
DESCRIPTION
this package is a class - instance it with the method new
FUNCTIONS
this module defined the followed functions
new - constructor
PARAMS:
INPUT_STREAMER - an array,string,soubroutine or a file descriptor (default not set)
MAX_PUSHBACK_SIZE - the max size in characters for the internal buffer used by push_back and the streamer is a file descriptor
the default is 0
set_input_descriptor - the first param is a value same as INPUT_STREAMER params: MAX_PUSHBACK_SIZE - equal to same param of the constructor
the method return the self object
get_chars - the first param is the number of chars to read (default 1)
on EOF the method return a null string
if the first param is == 0 the method return null string
on error throw an exception
get_char - equivalent to get_chars(1)
get_line - return a line in scalar mode or an array in array mode
on EOF the method return a null string
on error throw an exception
Note: if INPUT_STREAM is an array the line is an element of the array
the line has the new line terminator "\n" also the result of <> iterator
push_back - push character into the streamer the first param is a number of characters to push back the default is 1 the metod return the self object
EXPORT
None by default.
EXPORT_OK
<> - same as get_line
:overload - export only the overload methods
:all export all
SEE ALSO
Mention other useful documentation such as the documentation of related modules or operating system documentation (such as man pages in UNIX), or any relevant external documentation such as RFCs or standards.
AUTHOR
lorenzo.bellotti, <pauseblx@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by lorenzo.bellotti
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html