Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:1291928
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
require CHI;
require WWW::Mechanize::Cached;
require HTTP::Tiny::Mech;
require MetaCPAN::API;
 
my $mcpan = MetaCPAN::API->new(
ua => HTTP::Tiny::Mech->new(
mechua => WWW::Mechanize::Cached->new(
cache => CHI->new(
driver => 'File',
root_dir => '/tmp/metacpan-cache',
),
),
),
);

That's pretty sweet. Would you mind if I add this to the MetaCPAN::API POD?

Owner

Go for it. Sorry for the delayed response =). Though I'm working on ways to get this sort of support more "natively" to MetaCPAN::API

Added to the synopsis and released a new version with it. Thanks. :)

Feel free to update me if you change this, and I'll update the documentation.
At some point I should probably set up an Examples.pod for multiple examples...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.