Query: perlio::via::dynamic
OS: osx
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
dynamic(3) User Contributed Perl Documentation dynamic(3)NAMEPerlIO::via::dynamic - dynamic PerlIO layersSYNOPSISopen $fh, $fname; $p = PerlIO::via::dynamic->new (translate => sub { $_[1] =~ s/$Filename[:ws-./\]*$/$Filename: $fname$/e}, untranslate => sub { $_[1] =~ s/$Filename[:ws-./\]*$/$Filename$/}); $p->via ($fh); binmode $fh, $p->via; # deprecatedDESCRIPTION"PerlIO::via::dynamic" is used for creating dynamic PerlIO layers. It is useful when the behavior or the layer depends on variables. You should not use this module as via layer directly (ie :via(dynamic)). Use the constructor to create new layers, with two arguments: translate and untranslate. Then use "$p-"via ($fh)> to wrap the handle. Once <$fh> is destroyed, the temporary namespace for the IO layer will be removed. Note that PerlIO::via::dynamic uses the scalar fields to reference to the object representing the dynamic namespace.OPTIONStranslate A function that translate buffer upon write. untranslate A function that translate buffer upon read. use_read Use "READ" instead of "FILL" for the layer. Useful when caller expect exact amount of data from read, and the "untranslate" function might return different length. By default "PerlIO::via::dynamic" creates line-based layer to make "translate" implementation easier.AUTHORSChia-liang Kao <clkao@clkao.org>COPYRIGHTCopyright 2004 by Chia-liang Kao <clkao@clkao.org>. 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> perl v5.16.2 2008-05-31 dynamic(3)
Related Man Pages |
---|
io::digest(3) - osx |
perlio::via::symlink5.18(3) - mojave |
io::digest(3) - mojave |
perlio::via::dynamic5.18(3) - mojave |
perlio::via::symlink(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Perl: Filename expansion? |
translate text (1 position) with sed |
Reformat Data (Perl) |
local dynamic http development environment |
Assign output to dynamic variable |