Skip Menu |

This queue is for tickets about the RRD-Simple CPAN distribution.

Report information
The Basics
Id: 83325
Status: new
Priority: 0/
Queue: RRD-Simple

Owner: Nobody in particular
Requestors: richard [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: RRD::Simple update fails when value of single ds matches regexp for timestamp
Date: Thu, 14 Feb 2013 20:10:29 +0200
To: bug-RRD-Simple [...]
From: Richard van Katwijk <richard [...]>
Download (untitled) / with headers
text/plain 824b
Hi, The 'update' function fails when it is called with a single ds, and when the value of the ds is a large integer, which could be mistaken for a timestamp. Example: $rrd->update( 'packets'=>210188702); fails with : you must define at least one Data Source at <script>.pl line xxx While $rrd->update( 'packets'=>10188702); succeeds. This seems to be because the numeric portion of the regexp in RRD/ (~line 239) } elsif (!(@_ % 2) && $_[1] =~ /^[1-9][0-9]{8,10}$/i) { $rrdfile = shift; matches the integer value as a timestamp and then (incorrectly) sets the $rrdfile equal to the ds name. The simple 'fix' is to insist that the $rrdfile be passed as the first parameter to the 'update' call, so that the $ds=>$value specification is never misinterpreted. Kind regards, Richard van Katwijk

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to