Hello,
I think I've found a workaround for the problem. It seems that the
resolving/registering process doesn't try to resolve things using
arrays, which is what is being fed out of the first parsing routines.
So if that first part is skipped (making arrays), then the rest seems to
work fine.
*** /root/.cpan/build/Nagios-Object-0.20/lib/Nagios/Object.pm Fri Aug
24 00:39:06 2007
--- Object.pm Thu Dec 13 21:34:42 2007
***************
*** 783,791 ****
$self->_validate( $key, $value, @{$vf->{$key}} );
}
! if ( ref $vf->{$key}[0] eq 'ARRAY' && $value =~ /,/ ) {
! $value = [ split /\s*,\s*/, $value ];
! }
# set the value (which is an anonymous subroutine)
if ( defined($value) ) {
--- 783,791 ----
$self->_validate( $key, $value, @{$vf->{$key}} );
}
! #if ( ref $vf->{$key}[0] eq 'ARRAY' && $value =~ /,/ ) {
! # $value = [ split /\s*,\s*/, $value ];
! #}
# set the value (which is an anonymous subroutine)
if ( defined($value) ) {
Show quoted text> -----Original Message-----
>
>
------------------------------------------------------------------------
-
Show quoted text> Hello,
>
> I'm trying to use Nagios-Object-0.20 to parse some configs and check
> contacts for hosts. Hosts with multiple contact_groups doesn't parse
> quite right. When a host object with multiple contact_groups
attribute
Show quoted text> values is dumped, it does not show the attribute at all.
>
> Using Perl 5.8.8 on Fedora Core 5, kernel 2.6.18-1.2239.fc5. I've
> looked through the code, but I can't figure out where the problem is.
>
> Thanks,
>
> - Mike
>
> ----
> Mike McClure
> Network Engineer
> Peak Performance IT
> mmcclure@peakperformanceit.com
>