Reviews by Alastair MUnro

cpanratings
 

RSS

Nagios-Object (0.21.20) ***

Appreciate this is a reasonably new module, so it hasn't had much use, and there isn't many examples to google. On the whole the module works quite well. I used it to compare two nagios configs, as we are migrating to a new config, and need to keep a new config up to date with an existing config.

It would be useful if there were more examples of usage. I would describe myself as an intermediate perl programmer, and getting to grips with arrays or arrays, arrays of hashes and other nested data structures can take some effort!

Problems I experienced:

-Picking out nested attribute values like members. I could not get this to work and resorted to the dump() method. I used something like this:

if ($k1->attribute_is_list($a)) {

$num=$k1->$a; # $a is attribute name

if (defined $num) { # has a value; eg defined

print scalar(@$num)."\n"; # this shows the number of members

# As I could not work out how to get to the values I used dump()

-Some attributes return an array, even when they are not a list. For example Nagios::TimePeriod. Again I have to resort to the dump() function to get the values.

A couple of examples here would have helped.

Anyhow, many thanks, other than those issues, has been very valuable to me.