IO::Moose::Handle is a reimplementation of IO::Handle, with improvements.
$fh = IO::Moose::Handle->new;
$fh->fdopen( fileno(STDIN) );
$file = $fh->slurp;
$fh = IO::Moose::Handle->fdopen( *STDERR, '>' );
undef $fh; # calls close at DESTROY
This class provides an interface mostly compatible with IO::Handle. The differences:
* It is based on Moose object framework.
* It uses Exception::Base for signaling errors. Most of methods are throwing exception on failure.
* The modifiers like input_record_separator are supported on per-filehandler basis.
* It also implements additional methods like say, slurp.
* It is pure-Perl implementation.