X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=bindings%2Fperl-piped%2FRRDp.pm;h=c3fbf91f91de2ca03a9210c7d06c5453ee5e0044;hb=1d0d1678df2083bc996d579e0c5d0cc46fff6745;hp=e37104bd78f88fb351a9a06919122b2d724a760a;hpb=a4c8bc0c3fe53c713819358f506aa5d24bae5754;p=rrdtool.git diff --git a/bindings/perl-piped/RRDp.pm b/bindings/perl-piped/RRDp.pm index e37104b..c3fbf91 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 @@ -102,6 +105,7 @@ For more information on how to use RRDtool, check the manpages. Tobias Oetiker =cut + #' this is to make cperl.el happy use strict; @@ -120,7 +124,7 @@ sub cmd (@); sub end (); sub read (); -$VERSION=1.299908051800; +$VERSION=1.3002; sub start ($){ croak "rrdtool is already running" @@ -186,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"; }