IO::WrapTie

Wrap tieable objects in IO::Handle interface
Download

IO::WrapTie Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • David F. Skoll
  • Publisher web site:
  • http://search.cpan.org/~dskoll/IO-stringy-2.110/lib/IO/Stringy.pm

IO::WrapTie Tags


IO::WrapTie Description

Wrap tieable objects in IO::Handle interface IO::WrapTie is a Perl module to wrap tieable objects in IO::Handle interface.SYNOPSISFirst of all, you'll need tie(), so: require 5.004;Function interface (experimental). Use this with any existing class... use IO::WrapTie; use FooHandle; ### implements TIEHANDLE interface ### Suppose we want a "FooHandle->new(&FOO_RDWR, 2)". ### We can instead say... $FH = wraptie('FooHandle', &FOO_RDWR, 2); ### Now we can use... print $FH "Hello, "; ### traditional operator syntax... $FH->print("world! "); ### ...and OO syntax as well!OO interface (preferred). You can inherit from the IO::WrapTie::Slave mixin to get a nifty new_tie() constructor... #------------------------------ package FooHandle; ### a class which can TIEHANDLE use IO::WrapTie; @ISA = qw(IO::WrapTie::Slave); ### inherit new_tie() ... #------------------------------ package main; $FH = FooHandle->new_tie(&FOO_RDWR, 2); ### $FH is an IO::WrapTie::Master print $FH "Hello, "; ### traditional operator syntax $FH->print("world! "); ### OO syntax Requirements: · Perl


IO::WrapTie Related Software