ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.376 by root, Thu Aug 25 06:34:11 2011 UTC vs.
Revision 1.379 by root, Fri Aug 26 18:09:04 2011 UTC

878 AnyEvent::Impl::EventLib based on Event::Lib, leaks memory and worse. 878 AnyEvent::Impl::EventLib based on Event::Lib, leaks memory and worse.
879 AnyEvent::Impl::POE based on POE, very slow, some limitations. 879 AnyEvent::Impl::POE based on POE, very slow, some limitations.
880 AnyEvent::Impl::Irssi used when running within irssi. 880 AnyEvent::Impl::Irssi used when running within irssi.
881 AnyEvent::Impl::IOAsync based on IO::Async. 881 AnyEvent::Impl::IOAsync based on IO::Async.
882 AnyEvent::Impl::Cocoa based on Cocoa::EventLoop. 882 AnyEvent::Impl::Cocoa based on Cocoa::EventLoop.
883 AnyEvent::Impl::FLTK2 based on FLTK (fltk 2 binding). 883 AnyEvent::Impl::FLTK based on FLTK (fltk 2 binding).
884 884
885=item Backends with special needs. 885=item Backends with special needs.
886 886
887Qt requires the Qt::Application to be instantiated first, but will 887Qt requires the Qt::Application to be instantiated first, but will
888otherwise be picked up automatically. As long as the main program 888otherwise be picked up automatically. As long as the main program
1166 1166
1167Implement event-based interfaces to the protocols of the same name (for 1167Implement event-based interfaces to the protocols of the same name (for
1168the curious, IGS is the International Go Server and FCP is the Freenet 1168the curious, IGS is the International Go Server and FCP is the Freenet
1169Client Protocol). 1169Client Protocol).
1170 1170
1171=item L<AnyEvent::Handle::UDP>
1172
1173Here be danger!
1174
1175As Pauli would put it, "Not only is it not right, it's not even wrong!" -
1176there are so many things wrong with AnyEvent::Handle::UDP, most notably
1177its use of a stream-based API with a protocol that isn't streamable, that
1178the only way to improve it is to delete it.
1179
1180It features data corruption (but typically only under load) and general
1181confusion. On top, the author is not only clueless about UDP but also
1182fact-resistant - some gems of his understanding: "connect doesn't work
1183with UDP", "UDP packets are not IP packets", "UDP only has datagrams, not
1184packets", "I don't need to implement proper error checking as UDP doesn't
1185support error checking" and so on - he doesn't even understand what's
1186wrong with his module when it is explained to him.
1187
1188=item L<AnyEvent::DBI>
1189
1190Executes L<DBI> requests asynchronously in a proxy process for you,
1191notifying you in an event-based way when the operation is finished.
1192
1193=item L<AnyEvent::AIO> 1171=item L<AnyEvent::AIO>
1194 1172
1195Truly asynchronous (as opposed to non-blocking) I/O, should be in the 1173Truly asynchronous (as opposed to non-blocking) I/O, should be in the
1196toolbox of every event programmer. AnyEvent::AIO transparently fuses 1174toolbox of every event programmer. AnyEvent::AIO transparently fuses
1197L<IO::AIO> and AnyEvent together, giving AnyEvent access to event-based 1175L<IO::AIO> and AnyEvent together, giving AnyEvent access to event-based
1198file I/O, and much more. 1176file I/O, and much more.
1199 1177
1178=item L<AnyEvent::Filesys::Notify>
1179
1180AnyEvent is good for non-blocking stuff, but it can't detect file or
1181path changes (e.g. "watch this directory for new files", "watch this
1182file for changes"). The L<AnyEvent::Filesys::Notify> module promises to
1183do just that in a portbale fashion, supporting inotify on GNU/Linux and
1184some weird, without doubt broken, stuff on OS X to monitor files. It can
1185fall back to blocking scans at regular intervals transparently on other
1186platforms, so it's about as portable as it gets.
1187
1188(I haven't used it myself, but I haven't heard anybody complaining about
1189it yet).
1190
1191=item L<AnyEvent::DBI>
1192
1193Executes L<DBI> requests asynchronously in a proxy process for you,
1194notifying you in an event-based way when the operation is finished.
1195
1200=item L<AnyEvent::HTTPD> 1196=item L<AnyEvent::HTTPD>
1201 1197
1202A simple embedded webserver. 1198A simple embedded webserver.
1203 1199
1204=item L<AnyEvent::FastPing> 1200=item L<AnyEvent::FastPing>
1205 1201
1206The fastest ping in the west. 1202The fastest ping in the west.
1207 1203
1208=item L<Coro> 1204=item L<Coro>
1209 1205
1210Has special support for AnyEvent via L<Coro::AnyEvent>. 1206Has special support for AnyEvent via L<Coro::AnyEvent>, which allows you
1207to simply invert the flow control - don't call us, we will call you:
1208
1209 async {
1210 Coro::AnyEvent::sleep 5; # creates a 5s timer and waits for it
1211 print "5 seconds later!\n";
1212
1213 Coro::AnyEvent::readable *STDIN; # uses an I/O watcher
1214 my $line = <STDIN>; # works for ttys
1215
1216 AnyEvent::HTTP::http_get "url", Coro::rouse_cb;
1217 my ($body, $hdr) = Coro::rouse_wait;
1218 };
1211 1219
1212=back 1220=back
1213 1221
1214=cut 1222=cut
1215 1223
1225 1233
1226BEGIN { AnyEvent::common_sense } 1234BEGIN { AnyEvent::common_sense }
1227 1235
1228use Carp (); 1236use Carp ();
1229 1237
1230our $VERSION = '6.01'; 1238our $VERSION = '6.02';
1231our $MODEL; 1239our $MODEL;
1232 1240
1233our @ISA; 1241our @ISA;
1234 1242
1235our @REGISTRY; 1243our @REGISTRY;
1328 [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza 1336 [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza
1329 [Wx:: => AnyEvent::Impl::POE::], 1337 [Wx:: => AnyEvent::Impl::POE::],
1330 [Prima:: => AnyEvent::Impl::POE::], 1338 [Prima:: => AnyEvent::Impl::POE::],
1331 [IO::Async::Loop:: => AnyEvent::Impl::IOAsync::], # a bitch to autodetect 1339 [IO::Async::Loop:: => AnyEvent::Impl::IOAsync::], # a bitch to autodetect
1332 [Cocoa::EventLoop:: => AnyEvent::Impl::Cocoa::], 1340 [Cocoa::EventLoop:: => AnyEvent::Impl::Cocoa::],
1333 [FLTK:: => AnyEvent::Impl::FLTK2::], 1341 [FLTK:: => AnyEvent::Impl::FLTK::],
1334); 1342);
1335 1343
1336our @isa_hook; 1344our @isa_hook;
1337 1345
1338sub _isa_set { 1346sub _isa_set {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines