Beutelevision

by Thomas Beutel

Category: Perl

Suppress Test::More Output For Use In Nagios

I needed a quick way to check for XML well-formedness in a Perl Nagios script and I found that Test::XML has a test called is_well_formed_xml($xml) that does the job nicely. The only problem was that as part of the Test::More framework, Test::XML outputs test results (as it should). In my case though, I just wanted […]

Nagios, Belkin WeMo and a Plasma Globe

I monitor a number of servers using nagios and I always thought it would be neat to be able to have some sort of ambient device light up when there was a critical problem. Yes, I get email and text alerts, and nagios is always up in one tab on my browser, but I wanted […]

Useless use of private variable in void context (Perl)

Can you see what is wrong with this Perl code snippet? foreach my $cat (@$categories) { if ($cat->{col} == $column and $cat=>{pos} == $position) { return $cat; } } It gets the “Useless use of private variable in void context” at the last brace. Well, it took me a while, but it was the equal […]