projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prepare for the release of rrdtool-1.3rc9
[rrdtool.git]
/
bindings
/
perl-piped
/
RRDp.pm
diff --git
a/bindings/perl-piped/RRDp.pm
b/bindings/perl-piped/RRDp.pm
index
d2581bb
..
18151f3
100644
(file)
--- a/
bindings/perl-piped/RRDp.pm
+++ b/
bindings/perl-piped/RRDp.pm
@@
-99,7
+99,7
@@
For more information on how to use RRDtool, check the manpages.
=head1 AUTHOR
=head1 AUTHOR
-Tobias Oetiker <
oetiker@ee.ethz
.ch>
+Tobias Oetiker <
tobi@oetiker
.ch>
=cut
#' this is to make cperl.el happy
=cut
#' this is to make cperl.el happy
@@
-120,7
+120,7
@@
sub cmd (@);
sub end ();
sub read ();
sub end ();
sub read ();
-$VERSION=1.2
015
;
+$VERSION=1.2
99908060801
;
sub start ($){
croak "rrdtool is already running"
sub start ($){
croak "rrdtool is already running"
@@
-146,7
+146,6
@@
sub read () {
my $buffer;
my $nfound;
my $timeleft;
my $buffer;
my $nfound;
my $timeleft;
- my $ERR = 0;
vec($inmask,fileno(RRDreadHand),1) = 1; # setup select mask for Reader
while (1) {
my $rout;
vec($inmask,fileno(RRDreadHand),1) = 1; # setup select mask for Reader
while (1) {
my $rout;
@@
-163,11
+162,14
@@
sub read () {
$RRDp::error = undef;
if ($line =~ m|^ERROR|) {
$RRDp::error_mode eq 'catch' ? $RRDp::error = $line : croak $line;
$RRDp::error = undef;
if ($line =~ m|^ERROR|) {
$RRDp::error_mode eq 'catch' ? $RRDp::error = $line : croak $line;
- $ERR = 1;
+ $RRDp::sys = undef;
+ $RRDp::user = undef;
+ $RRDp::real = undef;
+ return undef;
}
}
- elsif ($line =~ m|^OK
u:([\d\.]+) s:([\d\.]+) r:([\d\.]+)
|){
+ elsif ($line =~ m|^OK
(?: u:([\d\.]+) s:([\d\.]+) r:([\d\.]+))?
|){
($RRDp::sys,$RRDp::user,$RRDp::real)=($1,$2,$3);
($RRDp::sys,$RRDp::user,$RRDp::real)=($1,$2,$3);
- return
$ERR == 1 ? undef :
\$buffer;
+ return \$buffer;
} else {
$buffer .= $line. "\n";
}
} else {
$buffer .= $line. "\n";
}