1"IO::Callback" provides an easy way to produce a phoney read-only filehandle 2that calls back to your own code when it needs data to satisfy a read. This 3is useful if you want to use a library module that expects to read data from 4a filehandle, but you want the data to come from some other source and you 5don't want to read it all into memory and use IO::String. 6 7 use IO::Callback; 8 9 my $fh = IO::Callback->new('<', sub { ... ; return $data }); 10 my $object = Some::Class->new_from_file($fh); 11 12Similarly, IO::Callback allows you to wrap up a coderef as a write-only 13filehandle, which you can pass to a library module that expects to write its 14output to a filehandle. 15 16 my $fh = IO::Callback->new('>', sub { my $data = shift ; ... }); 17 $object->dump_to_file($fh); 18 19INSTALLATION 20 21To install this module, run the following commands: 22 23 perl Build.PL 24 ./Build 25 ./Build test 26 ./Build install 27 28SUPPORT AND DOCUMENTATION 29 30After installing, you can find documentation for this module with the 31perldoc command. 32 33 perldoc IO::Callback 34 35You can also look for information at: 36 37 RT, CPAN's request tracker 38 http://rt.cpan.org/NoAuth/Bugs.html?Dist=IO::Callback 39 40 AnnoCPAN, Annotated CPAN documentation 41 http://annocpan.org/dist/IO::Callback 42 43 CPAN Ratings 44 http://cpanratings.perl.org/d/IO::Callback 45 46 Search CPAN 47 http://search.cpan.org/dist/IO::Callback 48 49 50COPYRIGHT AND LICENCE 51 52Copyright 1998-2005 Gisle Aas. 53 54Copyright 2009-2010 Dave Taylor. 55 56This program is free software; you can redistribute it and/or modify it 57under the same terms as Perl itself. 58 59