Something is leaking when using perl
Morten Guldager <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
'Aloha!
When using the perl bindings via the SNMP.pm module shipped together with
net-snmp I noticed some sort of a leak. Example code:
#!/usr/bin/perl
use strict;
use warnings;
use SNMP;
use Data::Dumper;
main();
sub main
{
print STDERR "SNMP::VERSION: $SNMP::VERSION\n";
for my $item ('something that leaks', 'more leaking stuff')
{
doit();
}
}
sub doit
{
my $session = new SNMP::Session(DestHost => '127.0.0.1',
Community => 'DoesNotWork',
Timeout => 0,
Version => '2c');
my $x = $session->bulkwalk(0, 1, ['.1.3.6.1.2.1.1.1']);
die 'DUMP IT: ' . Dumper \$x;
}
and the output:
SNMP::VERSION: 5.0601
DUMP IT: $VAR1 = \[
'something that leaks',
'more leaking stuff',
undef
];
Dunno if it's a bug or if I'm just coding badly.
We have discussed the issue a little over at the PerlMonks too:
http://www.perlmonks.org/?node_id=891581
I have tried a few versions of net-snmp, all on my kubuntu-10.04 box.
--
/Morten %-)
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users