Skip Menu |

This queue is for tickets about the SNMP-Extension-PassPersist CPAN distribution.

Report information
The Basics
Id: 46256
Status: resolved
Priority: 0/
Queue: SNMP-Extension-PassPersist

People
Owner: SAPER [...] cpan.org
Requestors: slb-cpan [...] silent.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 0.05



Subject: add_oid_tree bug?
Date: Wed, 20 May 2009 21:18:11 +0100
To: bug-SNMP-Extension-PassPersist [...] rt.cpan.org
From: Simon Brown <slb-cpan [...] silent.co.uk>
Hi First, thank you for a very helpful module :-) I think there maybe a small bug in the type validation code for add_oid_tree. The following test program demonstrates what I think is wrong: #!/usr/bin/perl use SNMP::Extension::PassPersist; my $e = SNMP::Extension::PassPersist->new; $e->add_oid_tree({ 0 => [ 'counter', 1 ]}); exit 0; ... running it gives: $ ~slb/bug.pl error: Unknown type at /home/slb/bug.pl line 6 The following tiny patch fixes it for me: @@ -229,7 +229,7 @@ my ($self, $new_tree) = @_; croak "error: Unknown type" - if any { !$snmp_ext_type{$_[0]} } values %$new_tree; + if any { !$snmp_ext_type{$_->[0]} } values %$new_tree; my $oid_tree = $self->oid_tree; @{$oid_tree}{keys %$new_tree} = values %$new_tree; Best Regards Simon
Subject: add_oid_tree bug
RT-Send-CC: saper [...] cpan.org
Apologies for being so long before releasing the new version. SNMP::Extension::PassPersist v0.05 is now available on the CPAN. -- Close the world, txEn eht nepO.