- or download this
die("Bad type\n") unless Net::SNMP->can($bah);
$bah = Net::SNMP->$bah();
- or download this
%is_valid_type = map { $_ => 1 } (
@{$Net::SNMP::Message::EXPORT_TAGS{'types'}}
...
die("Bad type\n") unless $is_valid_type{$bah};
$bah = Net::SNMP::Message->$bah();
- or download this
%type_map = map { $_ => Net::SNMP::Message->$_() } (
@{$Net::SNMP::Message::EXPORT_TAGS{'types'}}
...
$bah = $type_map{$bah}
or die("Bad type\n");
- or download this
%type_map = map {
my $type_num = Net::SNMP::Message->$_();
...
$bah = $type_map{$bah}
or die("Bad type\n");