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 […]

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 […]