Net-UCP - Net::UCP Problem with timeout

Posted on Fri Sep 26 14:20:57 2008 by robiwan
Net::UCP Problem with timeout
Dear all, I try to send SMS over a german SMS service-center from t-mobile, but there is a Problem with the Net::UCP Module: When i run the following Skript, it is quite similar to the documentation on the CPAN-Site, i got an error. The modules Net::UCP::IntTimeout and Time::Hires are installed.

Maybe someone can help me, to fix the problem. Many thanks in advance...

Best regards, Robert

this is the error message:

Can't locate object method "timeout" via package "Net::UCP::IntTimeout" at /usr/local/share/perl/5.8.8/Net/UCP.pm line 91.

this is my script:
#!/usr/bin/perl -w use Encode; use Net::UCP; $recipient = "+49171712345"; $text = "Hello World"; $sender = "sender"; my ($acknowledge, $error_number, $error_text); $emi = Net::UCP->new(SMSC_HOST => '10.10.1.2', SMSC_PORT => 9099, SENDER_TEXT => 'MyApp', WARN => 1, FAKE => 0 ) or die("Failed to create SMSC object"); $emi->open_link() or die($!); ($acknowledge,$error_number,$error_text) = $emi->login( SMSC_ID => '12345', SMSC_PW => 'secret', SHORT_CODE => '12345', ); die ("Login to SMSC failed. Error nbr: $error_number, Error txt: $error_text\n") unless($acknowledge); ($acknowledge,$error_number,$error_text) = $emi->send_sms( RECIPIENT => $recipient, #mand. MESSAGE_TEXT => $text, #opt SENDER_TEXT => $sender, #opt ); die("Sending SMS failed. Error nbr: $error_number, Error txt: $error_text\n") unless($acknowledge); $emi->close_link();
Direct Responses: 9054 | Write a response