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.332 by root, Tue Aug 31 23:32:40 2010 UTC vs.
Revision 1.340 by root, Fri Dec 3 18:39:06 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
1165 1167
1166BEGIN { AnyEvent::common_sense } 1168BEGIN { AnyEvent::common_sense }
1167 1169
1168use Carp (); 1170use Carp ();
1169 1171
1170our $VERSION = '5.271'; 1172our $VERSION = '5.29';
1171our $MODEL; 1173our $MODEL;
1172 1174
1173our $AUTOLOAD; 1175our $AUTOLOAD;
1174our @ISA; 1176our @ISA;
1175 1177
1289 last; 1291 last;
1290 } 1292 }
1291 } 1293 }
1292 1294
1293 $MODEL 1295 $MODEL
1294 or die "No event module selected for AnyEvent and autodetect failed. Install any one of these modules: EV, Event or Glib.\n"; 1296 or die "AnyEvent: backend autodetection failed - did you properly install AnyEvent?\n";
1295 } 1297 }
1296 } 1298 }
1297 1299
1298 @models = (); # free probe data 1300 @models = (); # free probe data
1299 1301
1300 push @{"$MODEL\::ISA"}, "AnyEvent::Base"; 1302 push @{"$MODEL\::ISA"}, "AnyEvent::Base";
1301 unshift @ISA, $MODEL; 1303 unshift @ISA, $MODEL;
1302 1304
1303 # now nuke some methods that are overriden by the backend. 1305 # now nuke some methods that are overridden by the backend.
1304 # SUPER is not allowed. 1306 # SUPER is not allowed.
1305 for (qw(time signal child idle)) { 1307 for (qw(time signal child idle)) {
1306 undef &{"AnyEvent::Base::$_"} 1308 undef &{"AnyEvent::Base::$_"}
1307 if defined &{"$MODEL\::$_"}; 1309 if defined &{"$MODEL\::$_"};
1308 } 1310 }
1309 1311
1310 require AnyEvent::Strict if $ENV{PERL_ANYEVENT_STRICT}; 1312 if ($ENV{PERL_ANYEVENT_STRICT}) {
1313 eval { require AnyEvent::Strict };
1314 warn "AnyEvent: cannot load AnyEvent::Strict: $@"
1315 if $@ && $VERBOSE;
1316 }
1311 1317
1312 (shift @post_detect)->() while @post_detect; 1318 (shift @post_detect)->() while @post_detect;
1313 1319
1314 *post_detect = sub(&) { 1320 *post_detect = sub(&) {
1315 shift->(); 1321 shift->();
1724} 1730}
1725 1731
1726package AnyEvent::CondVar; 1732package AnyEvent::CondVar;
1727 1733
1728our @ISA = AnyEvent::CondVar::Base::; 1734our @ISA = AnyEvent::CondVar::Base::;
1735
1736# only to be used for subclassing
1737sub new {
1738 my $class = shift;
1739 bless AnyEvent->condvar (@_), $class
1740}
1729 1741
1730package AnyEvent::CondVar::Base; 1742package AnyEvent::CondVar::Base;
1731 1743
1732#use overload 1744#use overload
1733# '&{}' => sub { my $self = shift; sub { $self->send (@_) } }, 1745# '&{}' => sub { my $self = shift; sub { $self->send (@_) } },
2652pronounced). 2664pronounced).
2653 2665
2654 2666
2655=head1 SEE ALSO 2667=head1 SEE ALSO
2656 2668
2669Tutorial/Introduction: L<AnyEvent::Intro>.
2670
2671FAQ: L<AnyEvent::FAQ>.
2672
2657Utility functions: L<AnyEvent::Util>. 2673Utility functions: L<AnyEvent::Util>.
2658 2674
2659Event modules: L<EV>, L<EV::Glib>, L<Glib::EV>, L<Event>, L<Glib::Event>, 2675Event modules: L<EV>, L<EV::Glib>, L<Glib::EV>, L<Event>, L<Glib::Event>,
2660L<Glib>, L<Tk>, L<Event::Lib>, L<Qt>, L<POE>. 2676L<Glib>, L<Tk>, L<Event::Lib>, L<Qt>, L<POE>.
2661 2677
2667Non-blocking file handles, sockets, TCP clients and 2683Non-blocking file handles, sockets, TCP clients and
2668servers: L<AnyEvent::Handle>, L<AnyEvent::Socket>, L<AnyEvent::TLS>. 2684servers: L<AnyEvent::Handle>, L<AnyEvent::Socket>, L<AnyEvent::TLS>.
2669 2685
2670Asynchronous DNS: L<AnyEvent::DNS>. 2686Asynchronous DNS: L<AnyEvent::DNS>.
2671 2687
2672Coroutine support: L<Coro>, L<Coro::AnyEvent>, L<Coro::EV>, 2688Thread support: L<Coro>, L<Coro::AnyEvent>, L<Coro::EV>, L<Coro::Event>.
2673L<Coro::Event>,
2674 2689
2675Nontrivial usage examples: L<AnyEvent::GPSD>, L<AnyEvent::XMPP>, 2690Nontrivial usage examples: L<AnyEvent::GPSD>, L<AnyEvent::IRC>,
2676L<AnyEvent::HTTP>. 2691L<AnyEvent::HTTP>.
2677 2692
2678 2693
2679=head1 AUTHOR 2694=head1 AUTHOR
2680 2695

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines