Closed oetiker closed 12 years ago
[oetiker] Try this:
{{{ --- RRDp.pm (revision 1199) +++ RRDp.pm (working copy) @@ -163,11 +163,14 @@ $RRDp::error = undef; if ($line =~ m|^ERROR|) { $RRDp::error_mode eq 'catch' ? $RRDp::error = $line : croak $line;
There is a problem in source:trunk/program/bindings/perl-piped/RRDp.pm when the '''error_mode''' is set to '''catch''' and an error occurs.
Since the behaviour of rrdtool in pipe mode describes the result of a command being one of two things
the RRDp needs to take into account that the read sequence is complete in either case.
Unfortunately the '''ERROR''' case returns to the read loop rather than returning. A simple {{{ return undef; }}} within the ERROR block should suffice, though I am not sure whether the timing variables should also be unset to avoid inappropriate use.