Net::T...::OAuth(3pm)
π Net::Twitter::OAuth β the manual, but make it slay π
okay bestie, you found yourself a Net::T...::OAuth(3pm) page β it's one of those User Contributed Perl Documentation situations, and honestly? It's giving "vintage". Let's get into it π«Ά
β¨ NAME β¨
Net::Twitter::OAuth β it's Net::Twitter, but with the 'Legacy' and 'OAuth' roles strapped on for backwards compatibility. yes, literally that. iconic behavior of an older era π
π VERSION π
version 4.01043 β write it down, no cap, because version numbers are forever and we respect them πΈ
π SYNOPSIS π
use Net::Twitter;
my $nt = Net::Twitter::OAuth->new(consumer_key => $key, consumer_secret => $secret);
that's it, that's the whole vibe. two lines and you're in business β
π¦ DESCRIPTION π¦
so here's the tea β β this module is genuinely just a little guy that makes you an instance of "Net::Twitter" with the "Legacy" and "OAuth" traits already applied. It's not doing anything spicy on its own.
It exists as a transparent backwards compatibility layer for the earlier versions of Net::Twitter::OAuth that used to subclass Net::Twitter. So like, if your old code was expecting that, this keeps it from breaking, and you don't even notice. main character energy: invisible, but essential π
For the full documentation (the real deep lore), go look at Net::Twitter and Net::Twitter::Role::OAuth.
π DEPRECATION NOTICE π
β οΈ bestie. listen. This module is deprecated. Like, it's still here, it still works, but it's the ex you keep on good terms with. Use Net::Twitter instead. fr fr.
Here's what you should be doing instead:
use Net::Twitter;
# Just the REST API; exceptions thrown on error
$nt = Net::Twitter->new(traits => [qw/API::RESTv1_1 OAuth/]);
# Just the REST API; errors wrapped - use $nt->get_error
$nt = Net::Twitter->new(traits => [qw/API::RESTv1_1 WrapError/]);
# Or, for code that uses legacy Net::Twitter idioms
$nt = Net::Twitter->new(traits => [qw/Legacy OAuth/]);
three options, three moods, pick your fighter π and note the comments in there β first one throws exceptions on error, second one wraps errors so you go through $nt->get_error, third one is for the code that's still living in legacy Net::Twitter idioms. iykyk.
π METHODS π
newβ creates a"Net::Twitter"object with the"Legacy"and"OAuth"traits applied. that's the whole job. if you want thenewoptions, they live in"new" in Net::Twitterβ go check there, this page isn't gatekeeping but it's also not repeating itself π
πΈ SEE ALSO πΈ
Net::TwitterNet::Twitter::Role::OAuth
the whole squad, right there π«Ά
π§ AUTHORS π§
- Marc Mims
<marc@questright.com> - Tatsuhiko Miyagawa
<miyagawa@bulknews.net>
thank you legends, we appreciate you π
π LICENSE π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, go off, just keep it Perl-flavored π
okay that's the whole page!! it came from perl v5.34.0, dated 2022-06-16, and the page itself is Net::T...::OAuth(3pm) β yes the title is abbreviated with dots, that's just how the header rolls, no notes π now go forth and use Net::Twitter instead, mwah πβ¨
π¦ where this page comes from
- debian bookworm: libnet-twitter-perl 4.01043-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-twitter-perl 4.01043-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-twitter-perl 4.01043-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms