The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SNMP::Effective::Dispatch - Base class for SNMP::Effective

DESCRIPTION

SNMP::Effective inherit from this class. The methods here are separated out just for convenience.

PACKAGE VARIABLES

%METHOD

This hash contains a mapping between

    $effective->add($key => [...]);
    SNMP::Effective::Dispatch::_$key();
    SNMP::$value();

This means that you can add your custom SNMP method if you like.

The SNMP::Effective::Dispatch::_walk() method, is a working example on this, since it's actually a series of getnext, seen from SNMP's perspective.

Example:

    $SNMP::Effective::Dispatch::METHOD{'foo'} = 'get';
    *SNMP::Effective::Dispatch::_foo = sub {
        my($self, $host) = @_;

        # do stuff...

        return $self->_end($host);
    };

    my $effective = SNMP::Effective->new(
                        foo => [$oid],
                        # ...
                    );

    # execute() will then call $effective->_foo($host) when
    # $host answer with data
    $effective->execute;

METHODS

dispatch

This method does the actual fetching, and is called by "execute" in SNMP::Effective.

AUTHOR

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

See SNMP::Effective