NAME
SNMP::Insight::Moose::MIB - Moose glue to write MIB roles
VERSION
version 0.002
METHODS
mib_oid
Declare the oid of the current MIB. E.g. in IFMIB.pm
mib_oid '1.3.6.1.2.1.31';
mib_name
Declare the name of the current MIB. E.g.
mib_name 'IF-MIB';
has_scalar $name => %options
has_scalar 'fooVal' => ( oid => '3' );
Declare a scalar entry of a given $name
into the current MIB role. Oid is relative to the MIB oid declare with mib_oid, unless it starts with a dot.
has_table $name %options
Declare a table of a given $name
into the current MIB role.
has_table "fooTable" => (
oid => "1.1",
index => "fooTableIndex",
columns => {
'fooTableIndex' => 1,
'fooTableBars' => 2,
'fooTableBaazes' => [ 3, 'munge_baazes' ],
}
);
* oid => $oid
* index => $index
* columns => %columns
AUTHOR
Gabriele Mambrini <g.mambrini@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Gabriele Mambrini.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.