Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-19 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found