Skip Menu |

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

Report information
The Basics
Id: 20924
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Nagios-Object

People
Owner: tobeya [...] cpan.org
Requestors: andrew.ruthven [...] catalyst.net.nz
Cc:
AdminCc:

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



Subject: Don't croak if file isn't present
Date: Thu, 10 Aug 2006 09:40:47 +1200
To: bug-Nagios-Object [...] rt.cpan.org
From: Andrew Ruthven <andrew.ruthven [...] catalyst.net.nz>
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

Hi, We're using Nagios::Object to build up a view of the Nagios configuration to generate escalation and dependency config files. It is helpful if Nagios::Object doesn't die if a config file isn't present. This patch generates a warning message, and then continues on. Would you consider applying it? Cheers! -- Andrew Ruthven, Wellington, New Zealand At work: andrew.ruthven@catalyst.net.nz At home: andrew@etc.gen.nz GPG fpr: 34CA 12A3 C6F8 B156 72C2 D0D7 D286 CE0C 0C62 B791

Message body is not shown because sender requested not to inline it.

I'll add a constructor option to Nagios::Option::Config that makes it possible to disable croaking. I have a bunch of changes queued up to go out, so this shouldn't take long to get released. Something like: my $cf = Nagios::Object::Config->new( ..., die_on_missing_files => undef );
Subject: Re: [rt.cpan.org #20924] Don't croak if file isn't present
Date: Fri, 11 Aug 2006 08:50:13 +1200
To: bug-Nagios-Object [...] rt.cpan.org
From: Andrew Ruthven <andrew.ruthven [...] catalyst.net.nz>
Show quoted text
> I'll add a constructor option to Nagios::Option::Config that makes it > possible to disable croaking. I have a bunch of changes queued up to > go out, so this shouldn't take long to get released. > > Something like: > > my $cf = Nagios::Object::Config->new( > ..., > die_on_missing_files => undef > );
That sounds like a better way to handle it. Thanks! -- Andrew Ruthven, Wellington, New Zealand At work: andrew.ruthven@catalyst.net.nz At home: andrew@etc.gen.nz GPG fpr: 34CA 12A3 C6F8 B156 72C2 D0D7 D286 CE0C 0C62 B791
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

THis should be fixed in v0.10. The new parameter (which I forgot to document) is called allow_missing_files. Example: my $cf = Nagios::Config->new( Filename => 'nagios.cfg', allow_missing_files => 1 );
Download Nagios-Object-0.10.tar.gz
application/x-gzip 71.3k

Message body not shown because it is not plain text.