/usr/share/doc/libsnmp-extension-passpersist-perl/examples/synopsis-passpersist.pl is in libsnmp-extension-passpersist-perl 0.07-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!perl
use strict;
use SNMP::Extension::PassPersist;
# create the object
my $extsnmp = SNMP::Extension::PassPersist->new(
backend_collect => \&update_tree,
);
# run the program
$extsnmp->run;
sub update_tree {
my ($self) = @_;
# add a few OID entries
$self->add_oid_entry(".1.2.42.1", "integer", 42);
$self->add_oid_entry(".1.2.42.2", "string" , "the answer");
}
|