barrycarlyon has asked for the wisdom of the Perl Monks concerning the following question:
Greetings
Im trying to write a perl script, which takes data from a database, and uses curl to interact with the Twitter API in order to update my status. Using CRON to trigger it.
This is my first attempt at a non website-outputting script
So Currently i Have:
################################################################# # # # LSRfm.com Twitter Updater # # (c) Barry Carlyon 2006 # # # ################################################################# #!/usr/bin/perl package CRON::Twitter::Twitter; use lib '/home/lsrfm/webs/www.lsrfm.com/perllib/'; use strict; use warnings; use WWW::Curl; use WWW::Curl::Easy; #use Class::Date; twitter(); sub twitter { print "Twitter time"; } 1;
However i get:
Can't locate loadable object for module WWW::Curl in @INC (@INC contai +ns: /home/lsrfm/webs/www.lsrfm.com/perllib/ /home/lsrfm/perllib /usr/ +local/lib/perl5/site_perl/5.8.5/mach /usr/local/lib/perl5/site_perl/5 +.8.5 /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_p +erl /usr/local/lib/perl5/5.8.5/BSDPAN /usr/local/lib/perl5/5.8.5/mach + /usr/local/lib/perl5/5.8.5 .) at Twitter.pm line 16 Compilation failed in require at Twitter.pm line 16. BEGIN failed--compilation aborted at Twitter.pm line 16.
I have downloaded and make'd WWW::Curl, and it is in the library location i have specified
Also how do i make a database connection?
As i tried including the database files, and it doesnt work, mainly becuase where the script runs, the perl libs are not installed at root, though are avaiable for access if quired for the web...
Update: forgot to mention, the system im on allows make'ing but not install'ing
Final Update - Turns out it was a dodgy install, and the paths listed done exists as the mach bits are at the directory i cant access/edit/install to. Anywho the net::twitter module does its job, i just need to cron it in, but i cant edit my crontab, as my server provider is being funny lol
Thanks for all the help :-)
Final Final Update
All working check twitter.com/lsrfm_com
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using www::curl
by almut (Canon) on Apr 19, 2007 at 14:34 UTC | |
Re: Using www::curl
by adrianh (Chancellor) on Apr 19, 2007 at 12:33 UTC | |
by barrycarlyon (Beadle) on Apr 19, 2007 at 13:01 UTC | |
Re: Using www::curl
by derby (Abbot) on Apr 19, 2007 at 12:55 UTC | |
Re: Using www::curl
by davidrw (Prior) on Apr 19, 2007 at 12:26 UTC |