CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Help using Google::Voice module


New User

Nov 15, 2014, 1:47 PM

Post #1 of 2 (2419 views)
Help using Google::Voice module Can't Post

 use Google::Voice;

my $g = Google::Voice->new->login('xxxxxx', 'xxxxxx');

# Send sms
$g->send_sms(5178810973 => 'Hello friend!');

# Error code from google on fail
print $@ if !$g->send_sms('invalid phone' => 'text message');

When I try to run this simple script to send a text message using google voice I get two error messages. The first:

Use of uninitialized value $_[1] in string at Mojo/ line 112.

I have no idea how to fix and I'm a little cautious about messing with this code which I don't know much about.
The second problem I get is:

Can't call method "send_sms" on an undefined value at line 6.

After looking it up online it seems that it's an error which happens when the login into google fails, but I'm unsure what I'm doing wrong. I place my username and password in single quotes where they're supposed to go.

Veteran / Moderator

Nov 15, 2014, 2:06 PM

Post #2 of 2 (2418 views)
Re: [whitewhite] Help using Google::Voice module [In reply to] Can't Post

I've never used the module so I looked it up on cpan and its documentation is a joke. There's no information other than the synopsis.

I don't think you're doing anything wrong since you're doing exactly what the synopsis shows.

It appears to be a bug in the module. There's an open bug report on this exact issue which was reported a year ago.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives