X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=bindings%2Fperl-piped%2FRRDp.pm;h=14cccf46d5e4050c07ef643c6ff1016dbc101058;hb=11bde7e8173af3a0bb9e4732bf6b3dcca6a5f134;hp=dc79358c7b71ed9c0f4bd0e77cae64145bb5ac62;hpb=fc212c1684e1721d7b7905184a0892261bb1ff41;p=rrdtool.git diff --git a/bindings/perl-piped/RRDp.pm b/bindings/perl-piped/RRDp.pm index dc79358..14cccf4 100644 --- a/bindings/perl-piped/RRDp.pm +++ b/bindings/perl-piped/RRDp.pm @@ -45,6 +45,9 @@ start RRDtool. The argument must be the path to the RRDtool executable pass commands on to RRDtool. check the RRDtool documentation for more info on the RRDtool commands. +B: Due to design limitations, B does not support the +C command - use C instead. + =item $answer = B read RRDtool's response to your command. Note that the $answer variable will @@ -187,6 +190,13 @@ sub cmd (@){ } $cmd =~ s/\n/ /gs; $cmd =~ s/\s/ /gs; + + # The generated graphs aren't necessarily terminated by a newline, + # causing RRDp::read() to wait for a line matching '^OK' forever. + if ($cmd =~ m/^\s*graph\s+-\s+/) { + croak "RRDp does not support the 'graph -' command - " + . "use 'graphv -' instead"; + } print RRDwriteHand "$cmd\n"; }