Skip Menu |

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

Report information
The Basics
Id: 59160
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Net-SNMP

People
Owner: dtown [...] cpan.org
Requestors: dennis.lichtenthaeler [...] episode-iv.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: v6.0.0
Fixed in: (no value)



Subject: Attribute "locked" is deprecated
According to perldiag and attributes, ":locked" has been deprecated as of Perl 5.10 and throws warnings (at least in Strawberry Perl 5.12.0). The attached patch removes the :locked attribute. I'm not sure whether this is side effect-free but the patched version runs fine here.
Subject: NET-SNMP-locked.patch
--- SNMP.pm.locked 2009-09-09 17:13:02.000000000 +0200 +++ SNMP.pm 2010-07-07 14:08:40.000000000 +0200 @@ -597,7 +597,7 @@ =cut -sub close : locked : method +sub close : method { my ($this) = @_; @@ -661,7 +661,7 @@ =cut -sub get_request : locked : method +sub get_request : method { my $this = shift; @@ -714,7 +714,7 @@ =cut -sub get_next_request : locked : method +sub get_next_request : method { my $this = shift; @@ -770,7 +770,7 @@ =cut -sub set_request : locked : method +sub set_request : method { my $this = shift; @@ -875,7 +875,7 @@ =cut -sub trap : locked : method +sub trap : method { my $this = shift; @@ -958,7 +958,7 @@ =cut -sub get_bulk_request : locked : method +sub get_bulk_request : method { my $this = shift; @@ -1034,7 +1034,7 @@ =cut -sub inform_request : locked : method +sub inform_request : method { my $this = shift; @@ -1109,7 +1109,7 @@ =cut -sub snmpv2_trap : locked : method +sub snmpv2_trap : method { my $this = shift; @@ -1174,7 +1174,7 @@ =cut -sub get_table : locked : method +sub get_table : method { my $this = shift; @@ -1327,7 +1327,7 @@ =cut -sub get_entries : locked : method +sub get_entries : method { my $this = shift; @@ -1559,7 +1559,7 @@ =cut -sub version : locked : method +sub version : method { my ($this) = @_; @@ -1577,7 +1577,7 @@ =cut -sub error : locked : method +sub error : method { return $_[0]->{_error} || q{}; } @@ -1591,7 +1591,7 @@ =cut -sub hostname : locked : method +sub hostname : method { return $_[0]->{_hostname}; } @@ -1605,7 +1605,7 @@ =cut -sub error_status : locked : method +sub error_status : method { return defined($_[0]->{_pdu}) ? $_[0]->{_pdu}->error_status() : 0; } @@ -1619,7 +1619,7 @@ =cut -sub error_index : locked : method +sub error_index : method { return defined($_[0]->{_pdu}) ? $_[0]->{_pdu}->error_index() : 0; } @@ -1641,7 +1641,7 @@ =cut -sub var_bind_list : locked : method +sub var_bind_list : method { return defined($_[0]->{_pdu}) ? $_[0]->{_pdu}->var_bind_list() : undef; } @@ -1661,7 +1661,7 @@ =cut -sub var_bind_names : locked : method +sub var_bind_names : method { return defined($_[0]->{_pdu}) ? @{$_[0]->{_pdu}->var_bind_names()} : (); } @@ -1681,7 +1681,7 @@ =cut -sub var_bind_types : locked : method +sub var_bind_types : method { return defined($_[0]->{_pdu}) ? $_[0]->{_pdu}->var_bind_types() : undef; } @@ -1702,7 +1702,7 @@ =cut -sub timeout : locked : method +sub timeout : method { my $this = shift; @@ -1732,7 +1732,7 @@ =cut -sub retries : locked : method +sub retries : method { my $this = shift; @@ -1769,7 +1769,7 @@ =cut -sub max_msg_size : locked : method +sub max_msg_size : method { my $this = shift; @@ -1876,7 +1876,7 @@ =cut -sub translate : locked : method +sub translate : method { my ($this, $mask) = @_; @@ -2001,22 +2001,22 @@ return debug(undef, $_[0]); } -sub pdu : locked : method +sub pdu : method { return $_[0]->{_pdu}; } -sub nonblocking : locked : method +sub nonblocking : method { return $_[0]->{_nonblocking}; } -sub security : locked : method +sub security : method { return $_[0]->{_security}; } -sub transport : locked : method +sub transport : method { return $_[0]->{_transport}; }
I will removed the "lock" subroutine attribute from the appropriate methods in the Net::SNMP module. This change will be included in the next release of the module.