<feed xmlns='http://www.w3.org/2005/Atom'>
<title>monitoring-plugin-perl, branch v0.40</title>
<subtitle>Monitoring::Plugin
</subtitle>
<id>https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/atom?h=v0.40</id>
<link rel='self' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/atom?h=v0.40'/>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/'/>
<updated>2018-07-25T20:16:18Z</updated>
<entry>
<title>release 0.40</title>
<updated>2018-07-25T20:16:18Z</updated>
<author>
<name>Sven Nierlein</name>
<email>sven@nierlein.de</email>
</author>
<published>2018-07-25T20:16:18Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=f11af14b6d68fd752cf74cd1ebb397688abbed7e'/>
<id>urn:sha1:f11af14b6d68fd752cf74cd1ebb397688abbed7e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>update changelog</title>
<updated>2018-07-25T20:13:33Z</updated>
<author>
<name>Sven Nierlein</name>
<email>sven@nierlein.de</email>
</author>
<published>2018-07-25T20:13:33Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=d60e9290dd22e37f9ede3c9c909b97603f6324c2'/>
<id>urn:sha1:d60e9290dd22e37f9ede3c9c909b97603f6324c2</id>
<content type='text'>
Signed-off-by: Sven Nierlein &lt;sven@nierlein.de&gt;
</content>
</entry>
<entry>
<title>Merge pull request #19 from tejr/config-read-error</title>
<updated>2018-05-28T06:55:47Z</updated>
<author>
<name>Sven Nierlein</name>
<email>sven@nierlein.org</email>
</author>
<published>2018-05-28T06:55:47Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=f4b90a56b819a219a147860deb3248883f86c0a8'/>
<id>urn:sha1:f4b90a56b819a219a147860deb3248883f86c0a8</id>
<content type='text'>
Fail with config -&gt;errstr() when undef read</content>
</entry>
<entry>
<title>Fail with config -&gt;errstr() when undef read</title>
<updated>2018-05-24T01:01:21Z</updated>
<author>
<name>Tom Ryder</name>
<email>tom@sanctum.geek.nz</email>
</author>
<published>2018-05-24T01:01:21Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=301a3564e6b7cf716b75440c5333e688ea814873'/>
<id>urn:sha1:301a3564e6b7cf716b75440c5333e688ea814873</id>
<content type='text'>
The Config::Tiny parent class for Monitoring::Plugin::Config does not
necessarily raise an exception in $@/$EVAL_ERROR on a failed call to its
-&gt;read() method. Indeed, it does not in most cases, at least in the most
recent Config::Tiny.

If a file does not exist or for whatever other reason cannot actually be
read--such as permissions problems--Monitoring::Plugin ends up reporting
a "Missing config section" to the caller, which is misleading.

This information is available from the -&gt;errstr() method of the base
class, however, and an inspection of the code for the -&gt;read() method in
the parent class suggests the correct approach is to look for a return
of `undef` from the -&gt;read() method, and use the return value of
-&gt;errstr() as the reported error for -&gt;_die(). This commit adds such a
check.

To reproduce, given the following plugin `mptest`:

    use strict;
    use warnings;
    use Monitoring::Plugin qw(%ERRORS);
    my $mp = Monitoring::Plugin-&gt;new(
    	usage =&gt; '',
    );
    $mp-&gt;getopts;
    $mp-&gt;plugin_exit($ERRORS{OK}, 'Done!');

Running it without options of course works, like so:

    $ perl mptest
    MPTEST OK - Done!

However, prior to this patch, if we specify --extra-opts with a
nonexistent filename, we get a misleading error:

    $ perl mptest --extra-opts=@/nonexistent
    Invalid section 'mptest' in config file '/nonexistent'

With this patch included, the error is more accurate and helpful:

    $ perl mptest --extra-opts=@/nonexistent
    Failed to open file '/nonexistent' for reading: No such file or directory
</content>
</entry>
<entry>
<title>Merge pull request #18 from tejr/master</title>
<updated>2018-03-07T07:54:08Z</updated>
<author>
<name>Sven Nierlein</name>
<email>sven@nierlein.org</email>
</author>
<published>2018-03-07T07:54:08Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=8180da509371afd3f3044b494a8cb87e70e73d64'/>
<id>urn:sha1:8180da509371afd3f3044b494a8cb87e70e73d64</id>
<content type='text'>
Remove "experimental" tag on "Message Methods"</content>
</entry>
<entry>
<title>Remove "experimental" tag on "Message Methods"</title>
<updated>2018-03-04T20:59:29Z</updated>
<author>
<name>Tom Ryder</name>
<email>tom@sanctum.geek.nz</email>
</author>
<published>2018-03-04T20:56:22Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=77de65e149c519f551e03e11c9c26605c9866b72'/>
<id>urn:sha1:77de65e149c519f551e03e11c9c26605c9866b72</id>
<content type='text'>
From a maintainer, Sven Nierlein:
&gt; I'd say we can remove the "experimental" tag there. It had been there
&gt; for years now and i see no reason why we would change them.

Partly resolves #14.
</content>
</entry>
<entry>
<title>Merge pull request #17 from tejr/arg-add-cleanup</title>
<updated>2017-12-22T10:49:49Z</updated>
<author>
<name>Sven Nierlein</name>
<email>sven@nierlein.org</email>
</author>
<published>2017-12-22T10:49:49Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=00660dfc0c5536e13f090c3d391d53d5d87c1e81'/>
<id>urn:sha1:00660dfc0c5536e13f090c3d391d53d5d87c1e81</id>
<content type='text'>
Clean up argument adding code a little bit</content>
</entry>
<entry>
<title>Remove "scalar" call entirely</title>
<updated>2017-12-16T01:09:16Z</updated>
<author>
<name>Tom Ryder</name>
<email>tom@sanctum.geek.nz</email>
</author>
<published>2017-12-16T01:09:16Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=da6fe80e84a20aaf405a89bd0203d9ce1abc097d'/>
<id>urn:sha1:da6fe80e84a20aaf405a89bd0203d9ce1abc097d</id>
<content type='text'>
Context with the lhs of the == operator forces this into scalar context
anyway, making this call redundant.
</content>
</entry>
<entry>
<title>Pass params validation by ref not copy</title>
<updated>2017-12-16T00:34:38Z</updated>
<author>
<name>Tom Ryder</name>
<email>tom@sanctum.geek.nz</email>
</author>
<published>2017-12-16T00:34:38Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=6518f384cc20561ddc0df32414a714164dd2eb95'/>
<id>urn:sha1:6518f384cc20561ddc0df32414a714164dd2eb95</id>
<content type='text'>
Since Params::Validate::validate() doesn't seem to actually mess with
this specification, may as well pass a reference rather than bother
copying the whole thing.
</content>
</entry>
<entry>
<title>Remove unneeded params around "scalar" call</title>
<updated>2017-12-16T00:30:52Z</updated>
<author>
<name>Tom Ryder</name>
<email>tom@sanctum.geek.nz</email>
</author>
<published>2017-12-16T00:30:52Z</published>
<link rel='alternate' type='text/html' href='https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=afa636bc749f76aed77380d39269bceecdd879d2'/>
<id>urn:sha1:afa636bc749f76aed77380d39269bceecdd879d2</id>
<content type='text'>
Operator precedence allows leaving these out.
</content>
</entry>
</feed>
