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.342 by root, Wed Dec 29 04:16:33 2010 UTC vs.
Revision 1.349 by root, Mon Jul 4 21:14:42 2011 UTC

85that isn't them. What's worse, all the potential users of your 85that isn't them. What's worse, all the potential users of your
86module are I<also> forced to use the same event loop you use. 86module are I<also> forced to use the same event loop you use.
87 87
88AnyEvent is different: AnyEvent + POE works fine. AnyEvent + Glib works 88AnyEvent is different: AnyEvent + POE works fine. AnyEvent + Glib works
89fine. AnyEvent + Tk works fine etc. etc. but none of these work together 89fine. AnyEvent + Tk works fine etc. etc. but none of these work together
90with the rest: POE + IO::Async? No go. Tk + Event? No go. Again: if 90with the rest: POE + EV? No go. Tk + Event? No go. Again: if your module
91your module uses one of those, every user of your module has to use it, 91uses one of those, every user of your module has to use it, too. But if
92too. But if your module uses AnyEvent, it works transparently with all 92your module uses AnyEvent, it works transparently with all event models it
93event models it supports (including stuff like IO::Async, as long as those 93supports (including stuff like IO::Async, as long as those use one of the
94use one of the supported event loops. It is easy to add new event loops 94supported event loops. It is easy to add new event loops to AnyEvent, too,
95to AnyEvent, too, so it is future-proof). 95so it is future-proof).
96 96
97In addition to being free of having to use I<the one and only true event 97In addition to being free of having to use I<the one and only true event
98model>, AnyEvent also is free of bloat and policy: with POE or similar 98model>, AnyEvent also is free of bloat and policy: with POE or similar
99modules, you get an enormous amount of code and strict rules you have to 99modules, you get an enormous amount of code and strict rules you have to
100follow. AnyEvent, on the other hand, is lean and to the point, by only 100follow. AnyEvent, on the other hand, is lean and to the point, by only
877 AnyEvent::Impl::Tk based on Tk, very broken. 877 AnyEvent::Impl::Tk based on Tk, very broken.
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.
883 AnyEvent::Impl::FLTK based on FLTK.
882 884
883=item Backends with special needs. 885=item Backends with special needs.
884 886
885Qt requires the Qt::Application to be instantiated first, but will 887Qt requires the Qt::Application to be instantiated first, but will
886otherwise be picked up automatically. As long as the main program 888otherwise be picked up automatically. As long as the main program
1150 1152
1151package AnyEvent; 1153package AnyEvent;
1152 1154
1153# basically a tuned-down version of common::sense 1155# basically a tuned-down version of common::sense
1154sub common_sense { 1156sub common_sense {
1155 # from common:.sense 3.3 1157 # from common:.sense 3.4
1156 ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ "\x3c\x3f\x33\x00\x0f\xf3\x0f\xc0\xf0\xfc\x33\x00"; 1158 ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ "\x3c\x3f\x33\x00\x0f\xf0\x0f\xc0\xf0\xfc\x33\x00";
1157 # use strict vars subs - NO UTF-8, as Util.pm doesn't like this atm. (uts46data.pl) 1159 # use strict vars subs - NO UTF-8, as Util.pm doesn't like this atm. (uts46data.pl)
1158 $^H |= 0x00000600; 1160 $^H |= 0x00000600;
1159} 1161}
1160 1162
1161BEGIN { AnyEvent::common_sense } 1163BEGIN { AnyEvent::common_sense }
1162 1164
1163use Carp (); 1165use Carp ();
1164 1166
1165our $VERSION = '5.29'; 1167our $VERSION = '5.34';
1166our $MODEL; 1168our $MODEL;
1167 1169
1168our $AUTOLOAD; 1170our $AUTOLOAD;
1169our @ISA; 1171our @ISA;
1170 1172
1209 [Qt:: => AnyEvent::Impl::Qt::], # requires special main program 1211 [Qt:: => AnyEvent::Impl::Qt::], # requires special main program
1210 [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza 1212 [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza
1211 [Wx:: => AnyEvent::Impl::POE::], 1213 [Wx:: => AnyEvent::Impl::POE::],
1212 [Prima:: => AnyEvent::Impl::POE::], 1214 [Prima:: => AnyEvent::Impl::POE::],
1213 [IO::Async::Loop:: => AnyEvent::Impl::IOAsync::], 1215 [IO::Async::Loop:: => AnyEvent::Impl::IOAsync::],
1216 [Cocoa::EventLoop:: => AnyEvent::Impl::Cocoa::],
1217 [FLTK:: => AnyEvent::Impl::FLTK::],
1214); 1218);
1215 1219
1216our %method = map +($_ => 1), 1220our %method = map +($_ => 1),
1217 qw(io timer time now now_update signal child idle condvar one_event DESTROY); 1221 qw(io timer time now now_update signal child idle condvar one_event DESTROY);
1218 1222

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines