我正在尝试测试 Perl 的 Twitter 模块的一些工作,并在运行它时面对提到的主题行。我运行它的系统是 AIX,Perl 版本是 5.8.8
代码。
#!/usr/bin/perl -w
use Net::Twitter::Lite;
use Scalar::Util 'blessed';
use strict;
require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
my $consumer_key = "ck";
my $consumer_secret = "cs";
my $access_key = "ak";
my $access_secret = "as";
my $nt = Net::Twitter::Lite->new(
consumer_key => $consumer_key,
consumer_secret => $consumer_secret,
access_token => $access_key,
access_token_secret => $access_secret,
);
$nt->update("Status Update from Perl!");
错误:
Can't locate object method "default_header" via package "LWP::UserAgent"
at /ts/vb/perl5/lib/perl5/Net/Twitter/Lite.pm line 104.