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.330 by root, Tue Aug 31 00:59:55 2010 UTC vs.
Revision 1.337 by root, Mon Nov 22 06:32:18 2010 UTC

46in a tutorial or some gentle introduction, have a look at the 46in a tutorial or some gentle introduction, have a look at the
47L<AnyEvent::Intro> manpage. 47L<AnyEvent::Intro> manpage.
48 48
49=head1 SUPPORT 49=head1 SUPPORT
50 50
51An FAQ document is available as L<AnyEvent::FAQ>.
52
51There is a mailinglist for discussing all things AnyEvent, and an IRC 53There also is a mailinglist for discussing all things AnyEvent, and an IRC
52channel, too. 54channel, too.
53 55
54See the AnyEvent project page at the B<Schmorpforge Ta-Sa Software 56See the AnyEvent project page at the B<Schmorpforge Ta-Sa Software
55Repository>, at L<http://anyevent.schmorp.de>, for more info. 57Repository>, at L<http://anyevent.schmorp.de>, for more info.
56 58
119The interface itself is vaguely similar, but not identical to the L<Event> 121The interface itself is vaguely similar, but not identical to the L<Event>
120module. 122module.
121 123
122During the first call of any watcher-creation method, the module tries 124During the first call of any watcher-creation method, the module tries
123to detect the currently loaded event loop by probing whether one of the 125to detect the currently loaded event loop by probing whether one of the
124following modules is already loaded: L<EV>, 126following modules is already loaded: L<EV>, L<AnyEvent::Impl::Perl>,
125L<Event>, L<Glib>, L<AnyEvent::Impl::Perl>, L<Tk>, L<Event::Lib>, L<Qt>, 127L<Event>, L<Glib>, L<Tk>, L<Event::Lib>, L<Qt>, L<POE>. The first one
126L<POE>. The first one found is used. If none are found, the module tries 128found is used. If none are detected, the module tries to load the first
127to load these modules (excluding Tk, Event::Lib, Qt and POE as the pure perl 129four modules in the order given; but note that if L<EV> is not
128adaptor should always succeed) in the order given. The first one that can 130available, the pure-perl L<AnyEvent::Impl::Perl> should always work, so
129be successfully loaded will be used. If, after this, still none could be 131the other two are not normally tried.
130found, AnyEvent will fall back to a pure-perl event loop, which is not
131very efficient, but should work everywhere.
132 132
133Because AnyEvent first checks for modules that are already loaded, loading 133Because AnyEvent first checks for modules that are already loaded, loading
134an event model explicitly before first using AnyEvent will likely make 134an event model explicitly before first using AnyEvent will likely make
135that model the default. For example: 135that model the default. For example:
136 136
1157 1157
1158package AnyEvent; 1158package AnyEvent;
1159 1159
1160# basically a tuned-down version of common::sense 1160# basically a tuned-down version of common::sense
1161sub common_sense { 1161sub common_sense {
1162 # from common:.sense 1.0 1162 # from common:.sense 3.3
1163 ${^WARNING_BITS} = "\xfc\x3f\x33\x00\x0f\xf3\xcf\xc0\xf3\xfc\x33\x00"; 1163 ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ "\x3c\x3f\x33\x00\x0f\xf3\x0f\xc0\xf0\xfc\x33\x00";
1164 # use strict vars subs - NO UTF-8, as Util.pm doesn't like this atm. (uts46data.pl) 1164 # use strict vars subs - NO UTF-8, as Util.pm doesn't like this atm. (uts46data.pl)
1165 $^H |= 0x00000600; 1165 $^H |= 0x00000600;
1166} 1166}
1167 1167
1168BEGIN { AnyEvent::common_sense } 1168BEGIN { AnyEvent::common_sense }
1169 1169
1170use Carp (); 1170use Carp ();
1171 1171
1172our $VERSION = '5.271'; 1172our $VERSION = '5.29';
1173our $MODEL; 1173our $MODEL;
1174 1174
1175our $AUTOLOAD; 1175our $AUTOLOAD;
1176our @ISA; 1176our @ISA;
1177 1177
1727 1727
1728package AnyEvent::CondVar; 1728package AnyEvent::CondVar;
1729 1729
1730our @ISA = AnyEvent::CondVar::Base::; 1730our @ISA = AnyEvent::CondVar::Base::;
1731 1731
1732# only to be used for subclassing
1733sub new {
1734 my $class = shift;
1735 bless AnyEvent->condvar (@_), $class
1736}
1737
1732package AnyEvent::CondVar::Base; 1738package AnyEvent::CondVar::Base;
1733 1739
1734#use overload 1740#use overload
1735# '&{}' => sub { my $self = shift; sub { $self->send (@_) } }, 1741# '&{}' => sub { my $self = shift; sub { $self->send (@_) } },
1736# fallback => 1; 1742# fallback => 1;
2654pronounced). 2660pronounced).
2655 2661
2656 2662
2657=head1 SEE ALSO 2663=head1 SEE ALSO
2658 2664
2665Tutorial/Introduction: L<AnyEvent::Intro>.
2666
2667FAQ: L<AnyEvent::FAQ>.
2668
2659Utility functions: L<AnyEvent::Util>. 2669Utility functions: L<AnyEvent::Util>.
2660 2670
2661Event modules: L<EV>, L<EV::Glib>, L<Glib::EV>, L<Event>, L<Glib::Event>, 2671Event modules: L<EV>, L<EV::Glib>, L<Glib::EV>, L<Event>, L<Glib::Event>,
2662L<Glib>, L<Tk>, L<Event::Lib>, L<Qt>, L<POE>. 2672L<Glib>, L<Tk>, L<Event::Lib>, L<Qt>, L<POE>.
2663 2673
2669Non-blocking file handles, sockets, TCP clients and 2679Non-blocking file handles, sockets, TCP clients and
2670servers: L<AnyEvent::Handle>, L<AnyEvent::Socket>, L<AnyEvent::TLS>. 2680servers: L<AnyEvent::Handle>, L<AnyEvent::Socket>, L<AnyEvent::TLS>.
2671 2681
2672Asynchronous DNS: L<AnyEvent::DNS>. 2682Asynchronous DNS: L<AnyEvent::DNS>.
2673 2683
2674Coroutine support: L<Coro>, L<Coro::AnyEvent>, L<Coro::EV>, 2684Thread support: L<Coro>, L<Coro::AnyEvent>, L<Coro::EV>, L<Coro::Event>.
2675L<Coro::Event>,
2676 2685
2677Nontrivial usage examples: L<AnyEvent::GPSD>, L<AnyEvent::XMPP>, 2686Nontrivial usage examples: L<AnyEvent::GPSD>, L<AnyEvent::IRC>,
2678L<AnyEvent::HTTP>. 2687L<AnyEvent::HTTP>.
2679 2688
2680 2689
2681=head1 AUTHOR 2690=head1 AUTHOR
2682 2691

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines