Tie::Layers

Tie::Layers is a Perl module to read and write files pipelined through a stack of subroutine layers.
Download

Tie::Layers Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Software Diamonds
  • Publisher web site:
  • http://search.cpan.org/~softdia/Archive-TarGzip-0.03/lib/Docs/Site_SVD/Archive_TarGzip.pm

Tie::Layers Tags


Tie::Layers Description

Tie::Layers is a Perl module to read and write files pipelined through a stack of subroutine layers. SYNOPSIS ##### # Subroutines # use Tie::Layers qw(is_handle config); $yes = is_handle( $file_handle ); ($key, $old_value) = config(%options, $key); ($key, $old_value) = config(%options, $key => $new_value ); #### # Config default startup options # @old_options_list = config(%options, @option_list); @old_options_list = config(%options, @option_list); @old_options_list = config(%options, %option_list); ##### # Class interface # require Tie::Layers; ##### # Using support methods and file handle with # the file subroutines such as open(), readline() # print(), close() # tie *LAYERS_FILEHANDLE, 'Tie::Layers', @options $layers = tied *LAYERS_FILEHANDLE; ##### # Using support methods only, no file subroutines # $layers = Tie::Layers->TIEHANDLE(@options); ($key, $old_value) = $layers->config($key); ($key, $old_value) = $layers->config($key => $new_value ); @old_options_list = $layers->config(@option_list); @old_options_list = $layers->config(@option_list); @old_options_list = $layers->config(%option_list); $data = $layers->fin($filename, @options); $data = $layers->fout($filename, $data, @options); $yes = $layers->is_handle( $file_handle );If a subroutine or method will process a list of options, @options, that subroutine will also process an array reference, @options, , or hash reference, %options, {@options}.The Tie::Layers program module contains the tie file handle Tie::Layers package. The Tie::Layers package provides the ability to insert a stack of subroutines between file subroutines print and realine and the underlying $file. The syntax of the subroutines of each layer of the readline stack and the print stack must comply to the the requirements described herein below.This is necessary so that the Tie::Layers READLINE and PRINT subroutines know how to transfer the output from one layer to the input of another layer. The stacks are setup by supplying options with a reference to the subroutine for each layer in the print stack and the readline stack. The Tie::Layers are line orientated and do not support any character file subrouintes.The getc, read, and write file subroutines are supported by the Tie::Layers package. The seek routines are line oriented in that the seek and tell subroutine positions are the line in the underlying file and not the character position in the file. Requirements: · Perl


Tie::Layers Related Software