I'm using Net::Twitter module 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:

use Net::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' => 'Perl Net::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' => 'Perl Net::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' );

Reply via email to