
IO::Statistics - Transparently perform statistics on IO handles

use IO::Statistics;
my ($read, $write) = (0, 0);
IO::Statistics->count (\$read, \$write, \*STDOUT);
# alternatively:
$ios = IO::Statistics->new (\$read, \$write);
$ios->via (\*STDOUT);
print "fooo";
print "bkzlfdlkf\n";
END {
print "read $read bytes read, wrote $write bytes\n";
}

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

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

----------------------------------- ------ ------ ------ ------ ------ ------ 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 ----------------------------------- ------ ------ ------ ------ ------ ------

Chia-liang Kao <clkao@clkao.org>

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.