Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentnl/http-tiny-mech
Wrap a WWW::Mechanize instance in an HTTP::Tiny compatible interface
https://github.com/kentnl/http-tiny-mech
Last synced: 4 days ago
JSON representation
Wrap a WWW::Mechanize instance in an HTTP::Tiny compatible interface
- Host: GitHub
- URL: https://github.com/kentnl/http-tiny-mech
- Owner: kentnl
- License: other
- Created: 2011-10-17T03:41:27.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T13:29:43.000Z (over 7 years ago)
- Last Synced: 2024-06-18T15:37:41.068Z (5 months ago)
- Language: Perl
- Homepage:
- Size: 287 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
HTTP::Tiny::Mech - Wrap a WWW::Mechanize instance in an HTTP::Tiny compatible interface.
# VERSION
version 1.001003
# SYNOPSIS
# 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()
);# 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( )
);
);# DESCRIPTION
This code is somewhat poorly documented, and highly experimental.
Its the result of a quick bit of hacking to get [`MetaCPAN::API`](https://metacpan.org/pod/MetaCPAN::API) working faster
via the [`WWW::Mechanize::Cached`](https://metacpan.org/pod/WWW::Mechanize::Cached) module ( and gaining cache persistence via
[`CHI`](https://metacpan.org/pod/CHI) )It works so far for this purpose.
At present, only ["get"](#get) and ["request"](#request) are implemented, and all other calls
fall through to a native [`HTTP::Tiny`](https://metacpan.org/pod/HTTP::Tiny).# ATTRIBUTES
## `mechua`
This class provides one non-standard parameter not in HTTP::Tiny, `mechua`, which
is normally an autovivified `WWW::Mechanize` instance.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](https://metacpan.org/pod/HTTP::Tiny#get).
## request
Interface should be the same as it is with ["request" in HTTP::Tiny](https://metacpan.org/pod/HTTP::Tiny#request)
# AUTHOR
Kent Fredric
# COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric .
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.