--- cvsroot/AnyEvent-SNMP/SNMP.pm 2010/10/31 18:15:22 1.10 +++ cvsroot/AnyEvent-SNMP/SNMP.pm 2012/04/15 11:02:07 1.12 @@ -77,8 +77,8 @@ of the machine running Net::SNMP, but also on the network latency and the speed of your SNMP agents. -AnyEvent::SNMP tries to dynamically adjust this number dynamically upwards -and downwards. +AnyEvent::SNMP tries to dynamically adjust this number upwards and +downwards. Increasing C<$MAX_OUTSTANDING> will not automatically use the extra request slots. To increase C<$MAX_OUTSTANDING> and make @@ -137,13 +137,16 @@ package AnyEvent::SNMP; -no warnings; -use strict qw(subs vars); +use common::sense; # it is possible to do this without loading # Net::SNMP::Dispatcher, but much more awkward. use Net::SNMP::Dispatcher; +# we could inherit fro Net:SNMP::Dispatcher, but since this is undocumented, +# I'd rather see it die (and reported) than silenty and subtly fail. +*msg_handle_alloc = \&Net::SNMP::Dispatcher::msg_handle_alloc; + sub Net::SNMP::Dispatcher::instance { AnyEvent::SNMP:: } @@ -151,7 +154,7 @@ use Net::SNMP (); use AnyEvent (); -our $VERSION = '1.0'; +our $VERSION = '6.0'; $Net::SNMP::DISPATCHER = instance Net::SNMP::Dispatcher; @@ -340,7 +343,7 @@ 1 } -sub activate($) { +sub loop($) { while ($BUSY) { $DONE = AE::cv; $DONE->recv; @@ -348,6 +351,9 @@ } } +*activate = \&loop; # 5.x compatibility? +*listen = \&loop; # 5.x compatibility? + sub one_event($) { # should not ever be used AnyEvent->one_event; #d# todo @@ -358,6 +364,15 @@ kick_job; } +# not provided yet: +# schedule # apparently only used by Net::SNMP::Dispatcher itself +# register # apparently only used by Net::SNMP::Dispatcher itself +# deregister # apparently only used by Net::SNMP::Dispatcher itself +# cancel # apparently only used by Net::SNMP::Dispatcher itself +# return_response_pdu # apparently not used at all? +# error # only used by Net::SNMP::Dispatcher itself? +# debug # only used by Net::SNMP::Dispatcher itself? + =head1 SEE ALSO L, L, L, L.