Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl SNMP Error Handling

by hippo (Priest)
on Jul 11, 2013 at 19:08 UTC ( #1043814=note: print w/ replies, xml ) Need Help??


in reply to Perl SNMP Error Handling

Of course. Simply test the defined nature of your object before trying to call the method.

if (defined $snmp) { ($descr,$uptime) = $snmp->get($vars); } else { die 'Horrors! My $snmp object is undefined!'; }

... or similar.


Comment on Re: Perl SNMP Error Handling
Download Code
Re^2: Perl SNMP Error Handling
by Anonymous Monk on Jul 12, 2013 at 11:40 UTC
    Man... I feel like an idiot -_-

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043814]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2015-03-28 13:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (625 votes), past polls