NAME

IO::Statistics - Transparently perform statistics on IO handles

SYNOPSIS

use IO::Statistics;

my ($read, $write) = (0, 0);
IO::Statistics->count (\$read, \$write, \*STDOUT);

# alternatively:
my $ios = IO::Statistics->new (\$read, \$write);
$ios->via (\*STDOUT);

print "fooo";
print "bkzlfdlkf\n";

END {
   print "read $read bytes read, wrote $write bytes\n";
}

DESCRIPTION

This module allows you to count IO activity on a file handle transparently.

BUGS

Using this IO layer on a global filehandle might result in segfault on perl_destruct.

TEST COVERAGE

----------------------------------- ------ ------ ------ ------ ------ ------
File                                  stmt branch   cond    sub   time  total
----------------------------------- ------ ------ ------ ------ ------ ------
blib/lib/IO/Statistics.pm            100.0  100.0    n/a  100.0  100.0  100.0
Total                                100.0  100.0    n/a  100.0  100.0  100.0
----------------------------------- ------ ------ ------ ------ ------ ------

AUTHORS

Chia-liang Kao <clkao@clkao.org>

COPYRIGHT

Copyright 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