pax_global_header00006660000000000000000000000064142162705570014523gustar00rootroot0000000000000052 comment=cb096edc984ae983388b80ddd48cf8f8248293c2 libanyevent-aio-perl-1.1/000077500000000000000000000000001421627055700154125ustar00rootroot00000000000000libanyevent-aio-perl-1.1/AIO.pm000066400000000000000000000024451421627055700163650ustar00rootroot00000000000000=head1 NAME AnyEvent::AIO - truly asynchronous file and directory I/O =head1 SYNOPSIS use AnyEvent::AIO; use IO::AIO; # can now use any of the aio requests your IO::AIO module supports # as long as you use an event loop supported by AnyEvent. =head1 DESCRIPTION This module is an L user, you need to make sure that you use and run a supported event loop. Loading this module will install the necessary magic to seamlessly integrate L into L, i.e. you no longer need to concern yourself with calling C or any of that stuff (you still can, but this module will do it in case you don't). The AnyEvent watcher can be disabled by executing C. Please notify the author of when and why you think this was necessary. =cut package AnyEvent::AIO; use strict; no warnings; use AnyEvent (); use IO::AIO (); use base Exporter::; our $VERSION = '1.1'; our $WATCHER; my $guard = AnyEvent::post_detect { $WATCHER = AnyEvent->io (fh => IO::AIO::poll_fileno, poll => 'r', cb => \&IO::AIO::poll_cb); }; $WATCHER ||= $guard; IO::AIO::_on_next_submit \&AnyEvent::detect; =head1 SEE ALSO L, L (for a more natural syntax). =head1 AUTHOR Marc Lehmann http://home.schmorp.de/ =cut 1 libanyevent-aio-perl-1.1/COPYING000066400000000000000000000000761421627055700164500ustar00rootroot00000000000000This module is licensed under the same terms as perl itself. libanyevent-aio-perl-1.1/Changes000066400000000000000000000005461421627055700167120ustar00rootroot00000000000000Revision history for AnyEvent::AIO 1.1 Tue Jul 21 05:24:54 CEST 2009 - when AnyEvent::AIO was loaded after event loop intiialise, then the watcher would get destroyed again. - take advantage of AnyEvent 3.81 API and simplify the module immensely. 1.0 Sat May 10 22:01:28 CEST 2008 - original version, a Net::SNMP::EV-clone. libanyevent-aio-perl-1.1/MANIFEST000066400000000000000000000002161421627055700165420ustar00rootroot00000000000000README MANIFEST COPYING Changes Makefile.PL AIO.pm t/00_load.t META.yml Module meta-data (added by MakeMaker) libanyevent-aio-perl-1.1/META.yml000066400000000000000000000011411421627055700166600ustar00rootroot00000000000000{ "no_index" : { "directory" : [ "t", "inc" ] }, "meta-spec" : { "version" : 1.4, "url" : "http://module-build.sourceforge.net/META-spec-v1.4.html" }, "generated_by" : "ExtUtils::MakeMaker version 6.50", "distribution_type" : "module", "version" : "1.1", "name" : "AnyEvent-AIO", "author" : [], "license" : "unknown", "build_requires" : { "ExtUtils::MakeMaker" : 0 }, "requires" : { "AnyEvent" : 3.4, "IO::AIO" : 3 }, "abstract" : null, "configure_requires" : { "ExtUtils::MakeMaker" : 0 } } libanyevent-aio-perl-1.1/Makefile.PL000066400000000000000000000006151421627055700173660ustar00rootroot00000000000000use ExtUtils::MakeMaker; my $mm = MM->new({ dist => { PREOP => 'pod2text AIO.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', COMPRESS => 'gzip -9v', SUFFIX => '.gz', }, NAME => "AnyEvent::AIO", VERSION_FROM => "AIO.pm", PREREQ_PM => { IO::AIO => 3.0, AnyEvent => 3.4, }, }); $mm->flush; libanyevent-aio-perl-1.1/README000066400000000000000000000017101421627055700162710ustar00rootroot00000000000000NAME AnyEvent::AIO - truly asynchronous file and directory I/O SYNOPSIS use AnyEvent::AIO; use IO::AIO; # can now use any of the aio requests your IO::AIO module supports # as long as you use an event loop supported by AnyEvent. DESCRIPTION This module is an AnyEvent user, you need to make sure that you use and run a supported event loop. Loading this module will install the necessary magic to seamlessly integrate IO::AIO into AnyEvent, i.e. you no longer need to concern yourself with calling "IO::AIO::poll_cb" or any of that stuff (you still can, but this module will do it in case you don't). The AnyEvent watcher can be disabled by executing "undef $AnyEvent::AIO::WATCHER". Please notify the author of when and why you think this was necessary. SEE ALSO AnyEvent, Coro::AIO (for a more natural syntax). AUTHOR Marc Lehmann http://home.schmorp.de/ libanyevent-aio-perl-1.1/t/000077500000000000000000000000001421627055700156555ustar00rootroot00000000000000libanyevent-aio-perl-1.1/t/00_load.t000066400000000000000000000001731421627055700172610ustar00rootroot00000000000000BEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use AnyEvent::AIO; $loaded = 1; print "ok 1\n";