View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Athanasios Douitsis > SNMP-Class-0.15 > SNMP::Class::Cache



Annotate this POD

View/Report Bugs
Module Version: 0.09   Source  


SNMP::Class::Cache - An SNMP::Class::ResultSet which is also a live SNMP::Class session.


The SNMP::Class::Cache class can be used as a combination of an SNMP::Class session object and an SNMP::Class::ResultSet object. This roughly means that the same object can be used both for querying and storing the results of SNMP queries.

 #create a session as usual
 my $s = SNMP::Class::Cache({DestHost => $myhost1}); 

 #add the ifTable to the Cache 

 #use it like an ordinary ResultSet
 print $s->ifTable->find(ifDescr=>'eth0')->ifSpeed;
 #Check whether the ifTable tree has been walked already
 print "ifTable already there" if ( $s->has("ifTable") );

 #or, get a list of the stuff already added to our resultset
 print join(',',$s->modules);



Walks the supplied object id's and adds the results to the resultset. The object id's can be many, e.g.



Returns true if the name supplied as argument has been walked in a previous add operation. Note that there is exact string comparison between the argument of the previous add call and the argument of the current has call. So, ifTable and . won't match. This behavior may change in the future.


Returns a list of all the previous arguments that have ever been supplied to the add method of the current object.

syntax highlighting: