Skip Menu |

This queue is for tickets about the Net-UCP CPAN distribution.

Report information
The Basics
Id: 62723
Status: resolved
Priority: 0/
Queue: Net-UCP

People
Owner: Nobody in particular
Requestors: Filip.Chodounsky [...] simac.cz
Cc:
AdminCc:

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



Subject: Bug in Net::UCP 0.41
Date: Fri, 5 Nov 2010 13:37:26 +0100
To: "'bug-Net-UCP [...] rt.cpan.org'" <bug-Net-UCP [...] rt.cpan.org>
From: Filip Chodounsky <Filip.Chodounsky [...] simac.cz>
Hi all, I've encountered a bug in Net::UCP 0.41. The construction of the variable $string in the function _make_5x() starting on line 1326 of UCP.pm should not use the hash functions "exists" e.g. (exists $arg->{adc} ? $arg->{adc} : '') ... but the functions "defined" e.g. (defined $arg->{adc} ? $arg->{adc} : '') ... since if the value of e.g. "exists $arg->{adc}" is true then the value of $arg->{adc} may be undefined and should not be used to construct the string $string. The substitution of "exists" by "defined" when testing hash values should probably be done in more places than the above mentioned one. I have not verified the replacment of other occurrences of "exists" function ;-( The other issue was the discrepancy between the documentation and implementation of send_sms() function. The parameter SENDER_TEXT is not inherited from the new() constructor. I've made a quick hack and substituted the original line 137 SENDER_TEXT => '', with SENDER_TEXT => $self->{SENDER_TEXT}, to make the inheritance work. Otherwise thanks for a great module ! Best Regards Filip
Hi Filip, thank you for using this module and sorry for big delay! Anyway about the questions "exists or defined?", i prefer to use exists because in this way you can just set UCP parameters that you need avoiding to declare ALL parameters and setting undefined those you don't need to use. Bye Marco