diff options
author | Niko Tyni <ntyni@iki.fi> | 2005-05-23 20:02:01 +0200 |
---|---|---|
committer | Niko Tyni <ntyni@iki.fi> | 2005-05-23 20:02:01 +0200 |
commit | 205fff014be2afad6cb4430a2fceabea8111c885 (patch) | |
tree | 000a8e759827fa8b48b4ecb8944f014d7bfacde3 /lib/Smokeping | |
parent | b83cf0d34b87d51fbdcf60d522b9c87ca4b4ccd2 (diff) | |
download | smokeping-205fff014be2afad6cb4430a2fceabea8111c885.tar.gz smokeping-205fff014be2afad6cb4430a2fceabea8111c885.tar.xz |
* Perl 5.8.0 compatibility fix ("missing max for DS uptime")
Diffstat (limited to 'lib/Smokeping')
-rw-r--r-- | lib/Smokeping/RRDtools.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Smokeping/RRDtools.pm b/lib/Smokeping/RRDtools.pm index ac70837..4a695d1 100644 --- a/lib/Smokeping/RRDtools.pm +++ b/lib/Smokeping/RRDtools.pm @@ -93,6 +93,7 @@ use RRDs; sub info2create { my $file = shift; my @create; + my $buggy_perl_version = 1 if $^V and $^V eq v5.8.0; my $info = RRDs::info($file); my $error = RRDs::error; die("RRDs::info $file: ERROR: $error") if $error; @@ -112,7 +113,8 @@ sub info2create { my @s = ("DS", $ds); for (qw(type minimal_heartbeat min max)) { die("$file: missing $_ for DS $ds?") - unless exists $info->{"ds[$ds].$_"}; + unless exists $info->{"ds[$ds].$_"} + or $buggy_perl_version; my $val = $info->{"ds[$ds].$_"}; push @s, defined $val ? $val : "U"; } @@ -122,7 +124,8 @@ sub info2create { my @s = ("RRA", $info->{"rra[$i].cf"}); for (qw(xff pdp_per_row rows)) { die("$file: missing $_ for RRA $i") - unless exists $info->{"rra[$i].$_"}; + unless exists $info->{"rra[$i].$_"} + or $buggy_perl_version; push @s, $info->{"rra[$i].$_"}; } push @create, join(":", @s); |