… | |
… | |
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) { |