Net::T...::OAuth(3pm)

πŸ“¦
version 4.01043 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble

πŸ’– 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 the new options, 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::Twitter
  • Net::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