[smokeping-users] Perl error in Smokeping.pm
Cherrington Stuart
Stuart.Cherrington at rhul.ac.uk
Mon Mar 10 16:37:51 CET 2008
Tobi,
Thanks for the snappy answer, I made the changes and restarted
smokeping, but the error still persists.
if ($tree->{$key}{__tree_link} and
$tree-{$key}{__tree_link}{menu}){
$menu = $tree->{$key}{__tree_link}{menu};
$title = $tree->{$key}{__tree_link}{title};
next if $tree->{$key}{__tree_link}{hide} and
$tree->{$key}{__tree_link}{hide} eq 'yes';
} elsif ($tree->{$key}{menu}) {
$menu = $tree->{$key}{menu};
$title = $tree->{$key}{title};
next if $tree->{$key}{hide} and $tree->{$key}{hide} eq
'yes';
};
Let me know if I did something wrong.
Thanks,
Stuart.
-----Original Message-----
From: Tobias Oetiker [mailto:tobi at oetiker.ch]
Sent: 10 March 2008 15:17
To: Cherrington Stuart
Cc: smokeping-users at lists.oetiker.ch
Subject: Re: [smokeping-users] Perl error in Smokeping.pm
Hi Stuart,
I guess the change you are intestested in would be:
@@ -624,11 +619,11 @@
if ($tree->{$key}{__tree_link} and
$tree->{$key}{__tree_link}{menu}){
$menu = $tree->{$key}{__tree_link}{menu};
$title = $tree->{$key}{__tree_link}{title};
- next if $tree->{$key}{__tree_link}{hide} eq 'yes';
+ next if $tree->{$key}{__tree_link}{hide} and
$tree->{$key}{__tree_link}{hide} eq 'yes';
} elsif ($tree->{$key}{menu}) {
$menu = $tree->{$key}{menu};
$title = $tree->{$key}{title};
- next if $tree->{$key}{hide} eq 'yes';
+ next if $tree->{$key}{hide} and $tree->{$key}{hide} eq
'yes';
};
cheers
tobi
Today Cherrington Stuart wrote:
> Hi,
>
> I'm using Smokeping 2.3.0-1 on Debian Etch. We're currently only using
> it to use the echoping utility to ping/graph SMTP latency. So far, my
> graphs are empty, this may be down to a config issue which I'm going
to
> hunt down later, or it may be due to an error I'm getting in the
> apache.log, it keeps erroring with:
>
> [Mon Mar 10 14:42:21 2008] [error] [client ip.ip.ip.ip] [Mon Mar 10
> 14:42:21 2008] smokeping.cgi [client ip.ip.ip.ip]: Use of
uninitialized
> value in string eq at /usr/share/perl5/smokeping/Smokeping.pm line
631.
>
> I've pasted the few lines here for people to check:
>
> my $hide;
> if ($tree->{$key}{__tree_link} and
> $tree->{$key}{__tree_link}{menu}){
> $menu = $tree->{$key}{__tree_link}{menu};
> $title = $tree->{$key}{__tree_link}{title};
> next if $tree->{$key}{__tree_link}{hide} eq 'yes';
> } elsif ($tree->{$key}{menu}) {
> $menu = $tree->{$key}{menu};
> $title = $tree->{$key}{title};
> next if $tree->{$key}{hide} eq 'yes';
> };
>
> I'm not a perl coder, so can anyone tell me what the issue is? This is
> further complicated by the fact the system is production and I'm not
> allowed to install anything other than approved Debian packages in the
> stable/testing/volatile areas so I can't go to 2.3.3. I can of course
> make a simple correction to one Perl Module ;-).
>
> Thanks,
>
> Stuart Cherrington
> Unix Admin
> Royal Holloway University.
>
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
More information about the smokeping-users
mailing list