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.384 by root, Mon Sep 5 07:21:54 2011 UTC vs.
Revision 1.385 by root, Mon Sep 5 08:51:14 2011 UTC

1347if (length $ENV{PERL_ANYEVENT_LOG}) { 1347if (length $ENV{PERL_ANYEVENT_LOG}) {
1348 require AnyEvent::Log; # AnyEvent::Log does the thing for us 1348 require AnyEvent::Log; # AnyEvent::Log does the thing for us
1349} 1349}
1350 1350
1351our @models = ( 1351our @models = (
1352 [EV:: => AnyEvent::Impl::EV:: , 1], 1352 [EV:: => AnyEvent::Impl::EV::],
1353 [AnyEvent::Loop:: => AnyEvent::Impl::Perl:: , 1], 1353 [AnyEvent::Loop:: => AnyEvent::Impl::Perl::],
1354 # everything below here will not (normally) be autoprobed 1354 # everything below here will not (normally) be autoprobed
1355 # as the pure perl backend should work everywhere 1355 # as the pure perl backend should work everywhere
1356 # and is usually faster 1356 # and is usually faster
1357 [Irssi:: => AnyEvent::Impl::Irssi::], # Irssi has a bogus "Event" package, so msut be near the top
1357 [Event:: => AnyEvent::Impl::Event::, 1], 1358 [Event:: => AnyEvent::Impl::Event::], # slow, stable
1358 [Glib:: => AnyEvent::Impl::Glib:: , 1], # becomes extremely slow with many watchers 1359 [Glib:: => AnyEvent::Impl::Glib::], # becomes extremely slow with many watchers
1360 # everything below here should not be autoloaded
1359 [Event::Lib:: => AnyEvent::Impl::EventLib::], # too buggy 1361 [Event::Lib:: => AnyEvent::Impl::EventLib::], # too buggy
1360 [Irssi:: => AnyEvent::Impl::Irssi::], # Irssi has a bogus "Event" package
1361 [Tk:: => AnyEvent::Impl::Tk::], # crashes with many handles 1362 [Tk:: => AnyEvent::Impl::Tk::], # crashes with many handles
1362 [Qt:: => AnyEvent::Impl::Qt::], # requires special main program 1363 [Qt:: => AnyEvent::Impl::Qt::], # requires special main program
1363 [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza 1364 [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza
1364 [Wx:: => AnyEvent::Impl::POE::], 1365 [Wx:: => AnyEvent::Impl::POE::],
1365 [Prima:: => AnyEvent::Impl::POE::], 1366 [Prima:: => AnyEvent::Impl::POE::],
1434 } 1435 }
1435 1436
1436 unless ($MODEL) { 1437 unless ($MODEL) {
1437 # try to autoload a model 1438 # try to autoload a model
1438 for (@REGISTRY, @models) { 1439 for (@REGISTRY, @models) {
1439 my ($package, $model, $autoload) = @$_; 1440 my ($package, $model) = @$_;
1440 if ( 1441 if (
1441 $autoload
1442 and eval "require $package" 1442 eval "require $package"
1443 and ${"$package\::VERSION"} > 0 1443 and ${"$package\::VERSION"} > 0
1444 and eval "require $model" 1444 and eval "require $model"
1445 ) { 1445 ) {
1446 AnyEvent::log 7 => "autoloaded model '$model', using it."; 1446 AnyEvent::log 7 => "autoloaded model '$model', using it.";
1447 $MODEL = $model; 1447 $MODEL = $model;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines