Vimal wrote:
Hi Guys,
Hello,
I am trying to learn modules in Perl.. I was checking the documentation
of Net::Twitter::Role::OAuth which has text:
========
In a web application mode, you need to save the oauth_token and
oauth_token_secret somewhere when you redirect the user to the OAuth
authorization
URL.
sub twitter_authorize : Local {
my($self, $c) = @_;
my $nt = Net::Twitter->new(traits => [qw/API::REST OAuth/], %param);
my $url = $nt->get_authorization_url(callback => $callbackurl);
$c->response->cookies->{oauth} = {
value => {
token => $nt->request_token,
token_secret => $nt->request_token_secret,
},
};
$c->response->redirect($url);
}
========
What is $c here?
$c is the argument passed to this method, for example:
twitter_authorize( $some_variable );
The value in $some_variable gets copied to $c.
Or more specifically, which module should I load to get
this line working (some http module I guess, but there are so many of
them I do not know):
Look at the documentation for what type of value twitter_authorize()
expects as its first argument.
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/