panic: corrupt saved stack index
(P) The savestack was requested to restore more
localized values than there are in the savestack.
####
#!/usr/SD/perl/bin/perl
use lib './testlib';
use strict;
use ObjTest;
use Internal::DBI;
my $dbh = logon();
my $sth = $dbh->prepare('select hostname from host');
$sth->execute;
my @hosts = map { $_ = $_->[0] } @{ $sth->fetchall_arrayref }[0..20];
foreach my $name ( @hosts ) {
my $host = ObjTest->new( name => $name );
my $true = $host->is_router();
print "RETURNED: $name is a router\n\n" if ( $true );
undef $host;
}
$sth->finish;
$dbh->disconnect;
####
sub is_router {
my $self = shift;
my $session = $self->{SESSION};
my $varbind = SNMP::VarList->new( [ 'whyReload' , 0 ] );
my $result = $session->get( $varbind );
if ( $session->{ErrorStr} ) { return 0; };
if ( $result =~ /winnt/i ) { return 1; };
}