Subject: | semantic bug @line 25 in XS.pm |
First of all thanks for your work. The code is effective and
useful.
I'm working with perl 5.8.8 (AIX 6.1 and Linux x86_64) and 5.10.1 (Linux
x86_64)
In function "sub send" the call to the bound C is as following:
21: my($self,%args) = @_;
22: return _ganglia_send(
23: $self,
24: $args{name} || "",
25: $args{value} || "",
26: $args{type} || "",
27: $args{units} || "",
28: $args{group} || "",
29: $args{desc} || "",
30: $args{title} || "",
31: 3, 60, 0);
that imply the third argument of _ganglia_send, the value, is
interpreted as "" (void string) whenever the actual $args{value}
is one of:
a) the hash key does'n exists (OK)
b) undef (OK)
c) the void string "" (not valid but managed by gmetad)
d) "0" (KO -> that should be passed as "0")
e) 0 (KO -> that should be passed as "0")
I suggest the following correction (valid for cases a),c),d),e)):
21: my($self,%args) = @_;
22: return _ganglia_send(
23: $self,
24: $args{name} || "",
25: exists $args{value} ? $args{value} : "",
26: $args{type} || "",
27: $args{units} || "",
28: $args{group} || "",
29: $args{desc} || "",
30: $args{title} || "",
31: 3, 60, 0);
marco