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.137 by root, Mon May 26 03:27:52 2008 UTC vs.
Revision 1.138 by root, Mon May 26 05:09:53 2008 UTC

739our $AUTOLOAD; 739our $AUTOLOAD;
740our @ISA; 740our @ISA;
741 741
742our @REGISTRY; 742our @REGISTRY;
743 743
744our $WIN32;
745
746BEGIN {
747 my $win32 = ! ! ($^O =~ /mswin32/i);
748 eval "sub WIN32(){ $win32 }";
749}
750
744our $verbose = $ENV{PERL_ANYEVENT_VERBOSE}*1; 751our $verbose = $ENV{PERL_ANYEVENT_VERBOSE}*1;
745 752
746our %PROTOCOL; # (ipv4|ipv6) => (1|2), higher numbers are preferred 753our %PROTOCOL; # (ipv4|ipv6) => (1|2), higher numbers are preferred
747 754
748{ 755{
749 my $idx; 756 my $idx;
750 $PROTOCOL{$_} = ++$idx 757 $PROTOCOL{$_} = ++$idx
751 for reverse split /\s*,\s*/, 758 for reverse split /\s*,\s*/,
752 $ENV{PERL_ANYEVENT_PROTOCOLS} || "ipv4,ipv6"; 759 $ENV{PERL_ANYEVENT_PROTOCOLS} || "ipv4,ipv6";
760}
761
762sub import {
763 shift;
764 return unless @_;
765
766 my $pkg = caller;
767
768 no strict 'refs';
769
770 for (@_) {
771 *{"$pkg\::WIN32"} = *WIN32 if $_ eq "WIN32";
772 }
753} 773}
754 774
755my @models = ( 775my @models = (
756 [EV:: => AnyEvent::Impl::EV::], 776 [EV:: => AnyEvent::Impl::EV::],
757 [Event:: => AnyEvent::Impl::Event::], 777 [Event:: => AnyEvent::Impl::Event::],

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines