OAuth:...atters(3pm)
π OAuth::Lite2::Formatters
okay so bestie, this is a page from the User Contributed Perl Documentation, and it lives in section 3pm (that's the Perl module man section, iykyk). The star of the show is OAuth::Lite2::Formatters β the OAuth 2.0 formatters store. Yes, a whole little shop of formatters. Let's get into it π
β¨ SYNOPSIS β¨
the way you grab one of these is literally two lines, no cap:
my $formatter = OAuth::Lite2::Formatter->get_formatter_by_name("json");
my $formatter = OAuth::Lite2::Formatter->get_formatter_by_type("application/json");
my $obj = $formatter->parse( $string );
$string = $formatter->format( $obj );
like, get your formatter, then parse strings into objects or format objects back into strings. chef's kiss π€
πΈ DESCRIPTION πΈ
So this is the OAuth 2.0 formatters store. Here's the tea: starting from draft-v8, the specification only requires the JSON format. Only. One. Format. π
But this library keeps the other formatters around anyway, as a lil treat for interop β so you can play nice with stuff that isn't strictly spec-compliant. Iconic of it honestly π«Ά
π METHODS π
π get_formatter_by_name( $name )
hands you back the formatter that matches by name. cute, simple, by-name energy π
π¦ get_formatter_by_type( $content_type )
hands you back the formatter that matches by content type. so if you've got a Content-Type lying around, this is your girl β¨
π₯ SEE ALSO π₯
go read these next, bestie, they're the whole friend group:
OAuth::Lite2::FormatterOAuth::Lite2::Formatter::JSONOAuth::Lite2::Formatter::XMLOAuth::Lite2::Formatter::FormURLEncoded
π AUTHOR π
Lyo Kato, <lyo.kato@gmail.com> β the main character who wrote all this π
π COPYRIGHT AND LICENSE π
Copyright (C) 2010 by Lyo Kato
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
fr fr, it's Perl-licensed β pick your Perl version, it's giving freedom π
and that's the whole page, bestie! π₯³ this one was rendered by perl v5.36.0 and dated 2023-07-01 β go forth and format responsibly π β¨π¦
π¦ where this page comes from
- debian trixie: liboauth-lite2-perl 0.11-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: liboauth-lite2-perl 0.11-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liboauth-lite2-perl 0.11-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liboauth-lite2-perl 0.11-3 Β· 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