Skip Menu |

This queue is for tickets about the Nagios-Object CPAN distribution.

Report information
The Basics
Id: 17945
Status: resolved
Priority: 0/
Queue: Nagios-Object

People
Owner: duncan_j_ferguson [...] yahoo.co.uk
Requestors: MSCHILLI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08
Fixed in: (no value)



Subject: dump() on SYNOPSIS code causes error
The code in the SYNOPSIS section of the manual page causes an error when the dump() method gets called on the object: Can't locate object method "name" via package "d" (perhaps you forgot to load "d"?) at ...5.8.5/Nagios/Object.pm line 520. Looks like instead of notification_options => [qw(d u r)], you need notification_options => "d,u,r", to work around the error. Here's the code to reproduce the problem: use Nagios::Object; my $some_command = "foo"; my $timeperiod = 5; my $generic_host = Nagios::Host->new( register => 0, parents => undef, check_command => $some_command, max_check_attempts => 3, checks_enabled => 1, event_handler => $some_command, event_handler_enabled => 0, low_flap_threshold => 0, high_flap_threshold => 0, flap_detection_enabled => 0, process_perf_data => 1, retain_status_information => 1, retain_nonstatus_information => 1, notification_interval => $timeperiod, notification_options => [qw(d u r)], notifications_enabled => 1, stalking_options => [qw(o d u)] ); $generic_host->dump();
On Thu Mar 02 15:06:58 2006, MSCHILLI wrote: Show quoted text
> The code in the SYNOPSIS section of the manual page causes an error when > the dump() method gets called on the object:
The test case given passes in 0.21.2 (test case provided added to tests and committed into the git repo). Thanks for reporting. Duncs