You just built an object. If you want to read tweets you have to use a
function that retrieves them.
For example, if you want to search for tweets
my $r = $nt->search("hello world");
print Dumper $r;
It may help if you read the documentation for that module
http://search.cpan.org/dist/Net-Twitter/lib/Net/Twitter.pod
On Dec 1, 9:20 am, Oreste wrote:
> I'm usingNet::Twittermodule which is working nicely. I'm getting
> back a lot of variables, I need to grab just those variables giving me
> the message and date. Could you help me to find them out?
>
> This is the script I'm using:
>
> useNet::Twitter;
> use Data::Dumper;
> my $nt =Net::Twitter->new(
> traits => [qw/API::REST/],
> username => 'user',
> password => 'pass'
> );
> print Dumper $nt;
>
> Here are the results:
>
> $VAR1 = bless( {
> 'ua' => bless( {
> 'max_redirect' => 7,
> 'protocols_forbidden' => undef,
> 'no_proxy' => [],
> 'protocols_allowed' => undef,
> 'use_eval' => 1,
> 'requests_redirectable' => [
> 'GET',
> 'HEAD'
> ],
> 'from' => undef,
> 'timeout' => 180,
> 'agent' => 'Net::Twitter/3.07001
> (Perl)',
> 'def_headers' => bless( {
> 'x-twitter-
> client' => 'PerlNet::Twitter',
> 'x-twitter-
> client-version' => '3.07001',
> 'x-twitter-
> client-url' => 'http://search.cpan.org/dist/Net-Twitter/'
> },
> 'HTTP::Headers' ),
> 'parse_head' => 1,
> 'proxy' => {},
> 'basic_authentication' => {
>
> 'twitter.com:80' => {
>
> 'Twitter API' => [
>
> 'user',
>
> 'pass'
>
> ]
>
> }
> },
> 'max_size' => undef
> }, 'LWP::UserAgent' ),
> 'source' => 'twitterpm',
> 'decode_html_entities' => '0',
> 'netrc' => '0',
> 'clientname' => 'PerlNet::Twitter',
> 'useragent' => 'Net::Twitter/3.07001 (Perl)',
> 'apihost' => 'twitter.com:80',
> 'apirealm' => 'Twitter API',
> 'clientver' => '3.07001',
> 'password' => 'pass',
> '_json_handler' => bless( [
> bless( do{\(my $o = '')},
> 'JSON::XS' ),
> 'encode',
> 'decode',
> 1
> ], 'JSON::Any' ),
> 'useragent_class' => 'LWP::UserAgent',
> 'clienturl' => 'http://search.cpan.org/dist/Net-Twitter/',
> 'ssl' => '0',
> 'useragent_args' => {},
> 'username' => 'user',
> 'apiurl' => 'http://twitter.com'
> }, 'Class::MOP::Class::__ANON__::SERIAL::2' );