Skip to content

Instantly share code, notes, and snippets.

@mattn
Last active August 29, 2015 14:20
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 mattn/6d73e12295c5c595ac0b to your computer and use it in GitHub Desktop.
Save mattn/6d73e12295c5c595ac0b to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use HTTP::Tinyish;
use YAML::Syck;
my $res = HTTP::Tinyish->new->get("http://www.cpan.org/");
warn Dump $res;
---
content: "\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>The Comprehensive Perl Archive Network - www.cpan.org</title>\n <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" /> <link rel=\"author\" href=\"mailto:cpan+linkrelauthor@perl.org\" />\n\t<link rel=\"canonical\" href=\"http://www.cpan.org/index.html\" />\t\n\t<link type=\"text/css\" rel=\"stylesheet\" href=\"misc/css/cpan.css\" /> \n\t\n<!-- Copyright Jarkko Hietaniemi <jhi@iki.fi>\n 1998,1999,2000,2001,2003,2003,2004,2005,2008\n Copyright 2010-2013 Ask Bjørn Hansen <ask@perl.org>\n All Rights Reserved.\n The CPAN Logo provided by J.C. Thorpe.\n You may distribute this document either under the Artistic License\n (comes with Perl) or the GNU Public License, whichever suits you.\n\n LEGALESE\n\n You are not allowed to remove or alter these comments.\n\n You are not allowed to rename, remove, or add any files\n in your public mirror of CPAN.\n\n \"Public mirror of CPAN\" means a site listed in\n the SITES.html and SITES files at the top level of CPAN\n and also listed at the site http://mirrors.cpan.org/.\n\n You are not allowed to alter any file\n in you public mirror of CPAN\n EXCEPT\n that you can add a short acknowledgement for example\n for your hosting company, company, university, or sponsor,\n into this CPAN top-level index.html by adding a small\n non-animated image and a hyperlink pointing to your organization\n with text like \"hosted by\", \"powered by\", or \"sponsored by\",\n by placing it visually next to the \"CPAN master site hosted by YellowBot\"\n acknowledgement at the bottom of the page.\n The image used may not be larger than the one used for the YellowBot logo.\n (Technical sidenote: if you do add an acknowledgement link,\n please do think of the consequences to your possible downstream\n CPAN mirrors.)\n Altering this index.html in any other way is not allowed.\n Altering any other files is not allowed.\n\n Adding any advertisements or any revenue-generating material\n is strictly forbidden.\n\n Similarly, for your public CPAN mirrors \"framing\" or \"wrapping\"\n the CPAN web pages into other sites by using e.g. HTML tables\n or frames is not allowed.\n\n You are allowed to use the files of CPAN to create your own\n web sites and services since we are just a distributor of the files,\n we do not own most of them. However, you may not call your creations\n \"CPAN\" or \"CPAN mirrors\". You may say that the files are \"mirrored\n from CPAN\".\n\n-->\n<script type=\"text/javascript\" charset=\"utf-8\">\n function focusField() {\n document.getElementById(\"searchfield\").focus();\n }\n onload = focusField;\n</script>\n\n\n</head>\n<body class=\"section_home\">\n\n<table id=\"wrapper\" border=\"0\" width=\"95%\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\">\n <tr>\n <td id=\"header\">\n \t\n\t\t\t<div id=\"header_left\">\n\t\t\t\t<a href=\"index.html\"><img src=\"misc/images/cpan.png\" id=\"logo\" alt=\"CPAN\" /></a>\n \t\t</div>\n\t\t\t\n\t\t\t<div id=\"header_right\">\n\t\t\t <h1>Comprehensive Perl Archive Network</h1>\n <p id=\"strapline\">Stop reinventing wheels, start building space rockets\n\n\n</p>\n </div>\n </td>\n </tr>\n <tr> \n <td id=\"menubar_holder\">\n\n <ul class=\"menubar\">\n\t\t\t\t<li><a href=\"index.html\">Home</a></li>\n <li><a href=\"modules/index.html\">Modules</a></li>\n <li><a href=\"ports/index.html\">Ports</a></li>\n <li><a href=\"src/README.html\">Perl Source</a></li>\n <li><a href=\"misc/cpan-faq.html\">FAQ</a></li>\n <li><a href=\"SITES.html\">Mirrors</a></li>\n\t\t\t</ul>\n\t\t\t\n\t\t\t<div id=\"searchbar\">\n\t\t\t\t<form method=\"get\" action=\"https://metacpan.org/search\" name=\"f\" class=\"searchbox menubar\" id=\"f\">\n\t\t\t\t<a href=\"https://metacpan.org/\">Search</a>:\n\t\t\t\t\t <input id=\"searchfield\" type=\"text\" name=\"q\" value=\"\" placeholder=\"Module name\" />\n\t\t\t\t\t<input type=\"submit\" value=\"Search\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</td>\n </tr>\n <tr>\n <td>\n <div id=\"content\">\n\t\t\t\n \n\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td class=\"third\">\n <h2>Welcome to CPAN</h2>\n <p>\n The Comprehensive Perl Archive Network (CPAN) currently\n has <a href=\"modules/index.html\">150,137\n Perl modules</a> in 31,788 distributions,\n written by 12,171 authors,\n <a href=\"SITES.html\">mirrored</a> on 251 servers.\n </p>\n <p>The archive has been online since October 1995 and is constantly growing.</p>\n\n\t\t\t<h2>Search CPAN via</h2>\n\n <ul>\n <li><a href=\"https://metacpan.org/\">metacpan.org</a></li>\n <li><a href=\"http://search.cpan.org/\">search.cpan.org</a></li>\n </ul>\n\n </td>\n\n <td class=\"third\">\n <div style=\"margin-left: 20px\">\n <h2>Recent Uploads</h2>\n \n \n \n \n <ul>\n \n <li><a href=\"https://metacpan.org/release/IVAN/DBIx-DBSchema-0.45\">DBIx-DBSchema-0.45</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/GAUDEON/Lego-From-PNG-0.02\">Lego-From-PNG-0.02</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/JBERGER/Mojolicious-Plugin-RevealJS-0.01\">Mojolicious-Plugin-RevealJS-0.01</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/PERLANCAR/Module-CoreList-More-0.07\">Module-CoreList-More-0.07</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/GAUDEON/Lego-From-PNG-0.01\">Lego-From-PNG-0.01</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/MAMOD/JavaScript-Duktape-0.0.1_1\">JavaScript-Duktape-0.0.1_1</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/RENEEB/OTRS-OPM-Maker-0.09\">OTRS-OPM-Maker-0.09</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/GENEHACK/Git-Wrapper-0.044_90-TRIAL\">Git-Wrapper-0.044_90-TRIAL</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/JJNAPIORK/Catalyst-ActionRole-MethodSignatureDependencyInjection-0.004\">Catalyst-ActionRole-MethodSignatureDependencyInjection-0.004</a></li>\n \n \n <li><a href=\"https://metacpan.org/release/PLICEASE/Dist-Zilla-Plugin-Test-Version-1.00\">Dist-Zilla-Plugin-Test-Version-1.00</a></li>\n \n <li><a href=\"https://metacpan.org/recent\"><strong>more...</strong></a></li>\n </ul>\n \n\n </div>\n </td>\n\n <td class=\"third\">\n <h2>Getting Started</h2>\n <ul>\n <li><a href=\"modules/INSTALL.html\">Installing Perl Modules</a></li>\n <li><a href=\"http://learn.perl.org/\">Learn Perl</a></li>\n </ul>\n\n <h2>Perl Resources</h2>\n <ul>\n <li><a href=\"http://www.perl.org/\">The Perl Programming language</a></li>\n <li><a href=\"http://perldoc.perl.org/\">Perl Documentation</a></li>\n <li><a href=\"http://lists.perl.org/\">Mailing Lists</a></li>\n <li><a href=\"http://learn.perl.org/faq/\">Perl FAQ</a></li>\n\t\t\t\t<li><a href=\"scripts/index.html\">Scripts Repository</a></li>\n\t\t\t</ul>\n </td>\n </tr>\n </table>\n\n </div>\n </td>\n </tr>\n <tr>\n <td id=\"footer\">\n <div id=\"footer_copyright\">\n <p>Yours Eclectically, The Self-Appointed Master Librarians (<i>OOK!</i>) of the CPAN.<br/>\n &copy; 1995-2010 Jarkko Hietaniemi. \n &copy; 2011-2013 <a href=\"http://www.perl.org\">Perl.org</a>. \n All rights reserved. \n <a href=\"disclaimer.html\">Disclaimer</a>.\n </p>\n </div>\n\n \n <div id=\"footer_mirror\">\n\t\t\t<p>Master mirror hosted by <a href=\"http://www.yellowbot.com/\"><img alt=\"YellowBot\" src=\"misc/images/yellowbot.png\" /></a></p>\n </div>\n \n\n\n </td>\n </tr>\n</table>\n\n\n</body>\n</html>\n\n"
headers:
accept-ranges: bytes
age: 56
client-date: Thu, 07 May 2015 05:39:31 GMT
client-peer: 10.192.128.82:8080
client-response-num: 1
client-transfer-encoding: chunked
connection: close
content-type: text/html; charset=UTF-8
date: Thu, 07 May 2015 05:38:34 GMT
etag: W/"328b64-1fa4-515771ea562c0"
last-modified: Thu, 07 May 2015 05:24:03 GMT
server: Apache/2.2.15 (CentOS)
vary: Accept-Encoding
via: 1.1 varnish-v4
x-varnish: 4907002 5447675
reason: OK
status: 200
success: 1
url: http://www.cpan.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment