HTTP::Tiny::Mech(3)
π HTTP::Tiny::Mech
ok so bestie, listen β this is the HTTP::Tiny::Mech page from the User Contributed Perl Documentation, and it's literally a whole vibe. Let me tell you everything β¨
πΈ NAME
HTTP::Tiny::Mech β it wraps a WWW::Mechanize instance up in an HTTP::Tiny-compatible interface. That's it, that's the whole thing π«Ά
π VERSION
version 1.001002 β periodt.
β¨ SYNOPSIS
ok so here's the moment where you actually call it. First up: you got something that expects an HTTP::Tiny instance, and you want HTTP::Mechanize doing the work under the hood:
# Get something that expects an HTTP::Tiny instance
# to work with HTTP::Mechanize under the hood.
#
my $thing => ThingThatExpectsHTTPTiny->new(
ua => HTTP::Tiny::Mech->new()
);
and then π¦ the second one β this is the one where you're like "ok but what if it went through WWW::Mechanize::Cached instead":
# Get something that expects HTTP::Tiny
# to work via WWW::Mechanize::Cached
#
my $thing => ThingThatExpectsHTTPTiny->new(
ua => HTTP::Tiny::Mech->new(
mechua => WWW::Mechanize::Cached->new( )
);
);
no cap, that's your whole entry point π
π DESCRIPTION
ok so real talk: this code is somewhat poorly documented, and highly experimental. Like, the author literally says so. Not me being shady, that's canon π
It's the result of a quick bit of hacking to get MetaCPAN::API working faster via the WWW::Mechanize::Cached module (and gaining cache persistence via CHI) π
It works so far for this purpose. That's the bar. It cleared it. slay π₯
At present, only get and request are implemented, and all other calls fall through to a native HTTP::Tiny. So like, everything else is just gonna be regular HTTP::Tiny behaviour, iykyk.
β οΈ heads up bestie: "somewhat poorly documented" and "highly experimental" are the author's own words β treat this thing like it's still in its experimental era.
π§ ATTRIBUTES
π mechua
This class provides one non-standard parameter not in HTTP::Tiny, called mechua, which is normally an autovivified WWW::Mechanize instance. (autovivified!! it just... appears. main character energy.)
You may override this parameter if you want to provide a custom instance of a WWW::Mechanize class π
β WRAPPED METHODS
π get
Interface should be the same as it is with get in HTTP::Tiny. literally same vibes, no surprises.
πΈ request
Interface should be the same as it is with request in HTTP::Tiny. again β same interface, go off π
π AUTHOR
Kent Fredric <kentnl@cpan.org>
π COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric <kentnl@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π«Ά
ok that's the whole page bestie, hope it ate π and for the sign-off: this was rendered by perl v5.42.2, dated 2023-07-03 β that's the HTTP::Tiny::Mech(3) page, we're done here, mwah πβ¨
π¦ where this page comes from
- alpine 3.24: perl-http-tiny-mech-doc 1.001002-r2 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms