* Darren <[email protected]> [100923 06:04]:
> I've tried adding in PERL5LIB for cron; still a problem the code that
> falls over in the crontab is as follows:
>
> $result = eval { $nt->update($text) };
>
> if ( $@ )
> {
> errorTrap("update failed because: $@");
> }
>
>
> When it runs on the command line no errors; however inside a cron it
> return 'OK' in $result and
> $@ returns a code 200 (ie a success code) and then fails....
That would indicate Twitter returned an HTTP 200 response with en error
payload. Let's try to get more information. Give this a try:
# make sure you have perl's basic diagnostics help
use warnings;
use strict;
use Data::Dumper;
print "Environment:\n", Dumper(\%ENV), "\n\n",
my $result = eval { $nt->update($text) };
if ( my $e = $@ ) {
print
"HTTP Request:\n",
Dumper($e->http_response->request->as_string), "\n\n",
"HTTP Response:\n",
Dumper($e->http_response->as_string), "\n\n";
}
Hopefully that will shed some light on the problem.
-Marc
--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group:
http://groups.google.com/group/twitter-development-talk