… | |
… | |
691 | no warnings; |
691 | no warnings; |
692 | use strict; |
692 | use strict; |
693 | |
693 | |
694 | use Carp; |
694 | use Carp; |
695 | |
695 | |
696 | our $VERSION = '3.41'; |
696 | our $VERSION = '3.5'; |
697 | our $MODEL; |
697 | our $MODEL; |
698 | |
698 | |
699 | our $AUTOLOAD; |
699 | our $AUTOLOAD; |
700 | our @ISA; |
700 | our @ISA; |
701 | |
701 | |
… | |
… | |
730 | 1 |
730 | 1 |
731 | } else { |
731 | } else { |
732 | push @post_detect, $cb; |
732 | push @post_detect, $cb; |
733 | |
733 | |
734 | defined wantarray |
734 | defined wantarray |
735 | ? bless \$cb, "AnyEvent::Util::Guard" |
735 | ? bless \$cb, "AnyEvent::Util::PostDetect" |
736 | : () |
736 | : () |
737 | } |
737 | } |
738 | } |
738 | } |
739 | |
739 | |
740 | sub AnyEvent::Util::Guard::DESTROY { |
740 | sub AnyEvent::Util::PostDetect::DESTROY { |
741 | @post_detect = grep $_ != ${$_[0]}, @post_detect; |
741 | @post_detect = grep $_ != ${$_[0]}, @post_detect; |
742 | } |
742 | } |
743 | |
743 | |
744 | sub detect() { |
744 | sub detect() { |
745 | unless ($MODEL) { |
745 | unless ($MODEL) { |