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

Barry Carlyon barry@barrycarlyon.co.uk

In reply to Using www::curl by barrycarlyon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.