Skip to content

Instantly share code, notes, and snippets.

@kentfredric
Created October 17, 2011 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentfredric/1291928 to your computer and use it in GitHub Desktop.
Save kentfredric/1291928 to your computer and use it in GitHub Desktop.
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',
),
),
),
);
@xsawyerx
Copy link

xsawyerx commented Nov 3, 2011

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

@kentfredric
Copy link
Author

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

@xsawyerx
Copy link

xsawyerx commented Apr 5, 2012

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