Data::LineBuffer

Provide a line oriented data push back facility for input sources
Download

Data::LineBuffer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Diab Jerius
  • Publisher web site:
  • http://search.cpan.org/~djerius/

Data::LineBuffer Tags


Data::LineBuffer Description

Provide a line oriented data push back facility for input sources Data::LineBuffer is a Perl module that provides a very rudimentary input push back facility. It provides a layer between the input source and the calling routine which allows data to be pushed back onto the input source for retrieval, as a last in, first out, stack.It is only concerned with line-oriented data, and can interface with a filehandle, a subroutine (which returns data), a string containing multiple lines to be parsed, or an array of lines. In order to provide a uniform interface, all returned input is chomp()'d.As an example, consider the following code: use Data::LineBuffer; my $src = new Data::LineBuffer "Line 1 Line 2 Line 3 Line 4 "; print $src->get, " "; print $src->get, " "; $src->unget( "Oh Happy Day!" ); $src->unget( "I Sing with Joy!" ); print $src->get, " "; print $src->get, " "; print $src->get, " ";This produces the following output: Line 1 Line 2 I Sing with Joy! Oh Happy Day! Line 3 Line 4 Requirements: · Perl


Data::LineBuffer Related Software