Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

anyevent::impl::eventlib(3pm) [debian man page]

AnyEvent::Impl::EventLib(3pm)				User Contributed Perl Documentation			     AnyEvent::Impl::EventLib(3pm)

NAME
AnyEvent::Impl::EventLib - AnyEvent adaptor for Event::Lib SYNOPSIS
use AnyEvent; use Event::Lib; # this module gets loaded automatically as required DESCRIPTION
This module provides transparent support for AnyEvent. You don't have to do anything to make Event work with AnyEvent except by loading Event::Lib before creating the first AnyEvent watcher. Note: the AnyEvent author has not found recent releases of Event::Lib to be even remotely working (not even the examples from the manpage or the testsuite work), so this event backend should be avoided (or somebody should step up and maintain it, hint, hint). The Event::Lib module suffers from the same limitations and bugs as libevent, most notably it kills already-installed watchers on a file descriptor and it is unable to support fork. These are not fatal issues, and are worked-around by this module, but the Event::Lib perl module itself has many additional bugs such as taking references to file handles and callbacks instead of making a copy or freeing still- allocated scalars, causing memory corruption and random crashes. Only Tk rivals it in its brokenness. This adaptor module employs the same workaround around the watcher problems as Tk and should therefore be avoided. (This was done for simplicity, one could in theory work around the problems with lower overhead by managing our own watchers). Event::Lib also leaks file handles and memory and tends to just exit on problems. It also doesn't work around the Windows bug of not signalling TCP connection failures. It also doesn't work with many special devices on Linux (/dev/random works, /dev/urandom fails, /dev/tty works, /dev/null fails and so on). Event::Lib does not support idle watchers. They could be emulated using low-priority timers but as the priority range (and availability) is not queryable nor guaranteed, and the default priority is likely the lowest one, this module cannot use them. Avoid Event::Lib if you can. SEE ALSO
AnyEvent, Event::Lib. AUTHOR
Marc Lehmann <schmorp@schmorp.de> http://anyevent.schmorp.de perl v5.14.2 2012-04-08 AnyEvent::Impl::EventLib(3pm)

Check Out this Related Man Page

AnyEvent::IRC(3pm)					User Contributed Perl Documentation					AnyEvent::IRC(3pm)

NAME
AnyEvent::IRC - An event based IRC protocol client API VERSION
Version 0.96 SYNOPSIS
Using the simplistic AnyEvent::IRC::Connection: use AnyEvent; use AnyEvent::IRC::Connection; my $c = AnyEvent->condvar; my $con = new AnyEvent::IRC::Connection; $con->connect ("localhost", 6667); $con->reg_cb ( connect => sub { my ($con) = @_; $con->send_msg (NICK => 'testbot'); $con->send_msg (USER => 'testbot', '*', '0', 'testbot'); }, irc_001 => sub { my ($con) = @_; print "$_[1]->{prefix} says I'm in the IRC: $_[1]->{params}->[-1]! "; $c->broadcast; } ); $c->wait; Using the more sophisticated AnyEvent::IRC::Client: use AnyEvent; use AnyEvent::IRC::Client; my $c = AnyEvent->condvar; my $timer; my $con = new AnyEvent::IRC::Client; $con->reg_cb (registered => sub { print "I'm in! "; }); $con->reg_cb (disconnect => sub { print "I'm out! "; $c->broadcast }); $con->reg_cb ( sent => sub { my ($con) = @_; if ($_[2] eq 'PRIVMSG') { print "Sent message! "; $timer = AnyEvent->timer ( after => 1, cb => sub { undef $timer; $con->disconnect ('done') } ); } } ); $con->send_srv ( PRIVMSG => 'elmex', "Hello there I'm the cool AnyEvent::IRC test script!" ); $con->connect ("localhost", 6667, { nick => 'testbot' }); $c->wait; $con->disconnect; DESCRIPTION
The AnyEvent::IRC module consists of AnyEvent::IRC::Connection, AnyEvent::IRC::Client and AnyEvent::IRC::Util. AnyEvent::IRC is just a module that holds this overview over the other modules. AnyEvent::IRC can be viewed as toolbox for handling IRC connections and communications. It won't do everything for you, and you still need to know a few details of the IRC protocol. AnyEvent::IRC::Client is a more highlevel IRC connection that already processes some messages for you and will generated some events that are maybe useful to you. It will also do PING replies for you, manage channels a bit, nicknames and CTCP. AnyEvent::IRC::Connection is a lowlevel connection that only connects to the server and will let you send and receive IRC messages. AnyEvent::IRC::Connection does not imply any client behaviour, you could also use it to implement an IRC server. Note that these modules use AnyEvent as it's IO event subsystem. You can integrate them into any application with a event system that AnyEvent has support for (eg. Gtk2 or Event). EXAMPLES
See the samples/ directory for some examples on how to use AnyEvent::IRC. AUTHOR
Robin Redeker, "<elmex@ta-sa.org>" SEE ALSO
AnyEvent::IRC::Util AnyEvent::IRC::Connection AnyEvent::IRC::Client AnyEvent RFC 1459 - Internet Relay Chat: Client Protocol RFC 2812 - Internet Relay Chat: Client Protocol BUGS
Please report any bugs or feature requests to "bug-net-irc3 at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AnyEvent-IRC>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc AnyEvent::IRC You can also look for information at: o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/AnyEvent-IRC> o CPAN Ratings <http://cpanratings.perl.org/d/AnyEvent-IRC> o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=AnyEvent-IRC> o Search CPAN <http://search.cpan.org/dist/AnyEvent-IRC> ACKNOWLEDGEMENTS
Thanks to Marc Lehmann for the new AnyEvent module! And these people have helped to work on AnyEvent::IRC: * Maximilian Gass - Added support for ISUPPORT and CASEMAPPING. * Zaba - Thanks for the useful input about IRC. * tokuhirom - Thanks for patches for the kick event. * Kazuhiro Osawa - Thanks for the documenation fix. COPYRIGHT &; LICENSE Copyright 2006-2009 Robin Redeker, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2011-03-01 AnyEvent::IRC(3pm)
Man Page