Commit 6f3225c2 authored by gregor herrmann's avatar gregor herrmann

Imported Upstream version 0.043

parent 5a528f85
......@@ -4,8 +4,23 @@ Thank you for considering contributing to this distribution. This file
contains instructions that will help you work with the source code.
The distribution is managed with Dist::Zilla. This means than many of the
usual files you might expect are not in the repository, but are generated
at release time (e.g. Makefile.PL).
usual files you might expect are not in the repository, but are generated at
release time (e.g. Makefile.PL).
Generally, **you do not need Dist::Zilla to contribute patches**. You do need
Dist::Zilla to create a tarball and/or install from the repository. See below
for guidance.
### Acceptable contributions
HTTP::Tiny is considered nearly feature-complete. The only features likely to
be added are those that improve compliance with RFC 2616. If you have ideas
for other features, please look at
[HTTP::Tiny::UA](http://p3rl.org/HTTP::Tiny::UA/) and consider adding your
feature there.
Bug fixes and performance improvements that do not bloat the code will be
considered for inclusion.
### Getting dependencies
......@@ -27,22 +42,16 @@ You can run tests directly using the `prove` tool:
$ prove -l
$ prove -lv t/some_test_file.t
For most distributions, `prove` is entirely sufficent for you to test any
patches you have.
For most of my distributions, `prove` is entirely sufficient for you to test any
patches you have. I use `prove` for 99% of my testing during development.
### Code style and tidying
Please try to match any existing coding style. If there is a `.perltidyrc`
file, please install Perl::Tidy and use perltidy before submitting patches.
If there is a `tidyall.ini` file, you can also install Code::TidyAll and run
`tidyall` on a file or `tidyall -a` to tidy all files.
Please try to match any existing coding style.
### Patching documentation
Much of the documentation Pod is generated at release time.
Depending on the distribution, some documentation may be written in a Pod
dialect called WikiDoc. (See Pod::WikiDoc on CPAN.)
If you would like to submit a documentation edit, please limit yourself to the
documentation you see.
......@@ -50,12 +59,34 @@ documentation you see.
If you see typos or documentation issues in the generated docs, please
email or open a bug ticket instead of patching.
### Learning Dist::Zilla
### Installing from the repository
If you want to install directly from the repository, you need to have
Dist::Zilla installed (see below). If this is a burden to you, I welcome
patches against a CPAN tarball instead of the repository.
### Installing and using Dist::Zilla
Dist::Zilla is a very powerful authoring tool, but requires a number of
author-specific plugins. If you would like to use it for contributing,
install it from CPAN, then run one of the following commands, depending on
your CPAN client:
Dist::Zilla is a very powerful authoring tool, optimized for maintaining a
large number of distributions with a high degree of automation, but it has a
large dependency chain, a bit of a learning curve and requires a number of
author-specific plugins.
To install it from CPAN, I recommend one of the following approaches for
the quickest installation:
# using CPAN.pm, but bypassing non-functional pod tests
$ cpan TAP::Harness::Restricted
$ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla
# using cpanm, bypassing *all* tests
$ cpanm -n Dist::Zilla
In either case, it's probably going to take about 10 minutes. Go for a walk,
go get a cup of your favorite beverage, take a bathroom break, or whatever.
When you get back, Dist::Zilla should be ready for you.
Then you need to install any plugins specific to this distribution:
$ cpan `dzil authordeps`
$ dzil authordeps | cpanm
......@@ -66,5 +97,9 @@ Once installed, here are some dzil commands you might try:
$ dzil test
$ dzil xtest
To install from the repository, use:
$ dzil install
You can learn more about Dist::Zilla at http://dzil.org/
Release notes for HTTP-Tiny
0.043 2014-02-20 20:40:23-05:00 America/New_York
[FIXED]
- Does not send absolute request URI when tunneling SSL via proxy
- Fixes regression in setting host name to verify SSL
- Protects tests from https_proxy and all_proxy when doing mock testing
0.042 2014-02-18 11:23:17EST-0500 America/New_York
[ADDED]
- If IO::Socket::IP 0.25+ is installed, HTTP::Tiny will use it for
transparent IPv4 or IPv6 support.
0.041 2014-02-17 13:07:54-05:00 America/New_York
[no code change, only an amended Changes file]
[INCOMPATIBLE CHANGES (from 0.039)]
- The 'proxy' attribute no longer takes precedence over the
'http_proxy' environment variable. With the addition of http_proxy
and https_proxy attributes (and corresponding environment variable
defaults), the legacy 'proxy' attribute now maps to the
all_proxy/ALL_PROXY environment variable and only takes effect when
other proxy attributes are not defined.
[ADDED (since 0.039)]
- Added 'keep_alive' attribute for single-server persistent connections
(Clinton Gormley)
- Added support for Basic authorization with proxies
- Added support for https proxies via CONNECT
[FIXED (since 0.039)]
- Requests are made with one less write for lower latency (Martin
Evans)
0.040 2014-02-17 13:02:47-05:00 America/New_York
[INCOMPATIBLE CHANGES]
- The 'proxy' attribute no longer takes precedence over the
'http_proxy' environment variable. With the addition of http_proxy
and https_proxy attributes (and corresponding environment variable
defaults), the legacy 'proxy' attribute now maps to the
all_proxy/ALL_PROXY environment variable and only takes effect when
other proxy attributes are not defined.
[ADDED]
- Added support for Basic authorization with proxies
- Added support for https proxies via CONNECT
0.039 2013-11-27 19:48:29 America/New_York
[FIXED]
......
This software is copyright (c) 2013 by Christian Hansen.
This software is copyright (c) 2014 by Christian Hansen.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2013 by Christian Hansen.
This software is Copyright (c) 2014 by Christian Hansen.
This is free software, licensed under:
......@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2013 by Christian Hansen.
This software is Copyright (c) 2014 by Christian Hansen.
This is free software, licensed under:
......
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.013.
CONTRIBUTING
Changes
LICENSE
......@@ -37,6 +38,8 @@ t/141_no_proxy.t
t/150_post_form.t
t/160_cookies.t
t/161_basic_auth.t
t/162_proxy_auth.t
t/170_keepalive.t
t/200_live.t
t/200_live_local_ip.t
t/210_live_ssl.t
......@@ -83,12 +86,18 @@ t/cases/get-19.txt
t/cases/get-20.txt
t/cases/get-21.txt
t/cases/head-01.txt
t/cases/keepalive-01.txt
t/cases/keepalive-02.txt
t/cases/keepalive-03.txt
t/cases/keepalive-04.txt
t/cases/keepalive-05.txt
t/cases/mirror-01.txt
t/cases/mirror-02.txt
t/cases/mirror-03.txt
t/cases/mirror-04.txt
t/cases/mirror-05.txt
t/cases/post-01.txt
t/cases/proxy-auth-01.txt
t/cases/put-01.txt
t/cases/put-02.txt
t/cases/put-03.txt
......
......@@ -5,7 +5,7 @@
"David Golden <dagolden@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830",
"generated_by" : "Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.133380",
"license" : [
"perl_5"
],
......@@ -33,10 +33,10 @@
},
"develop" : {
"requires" : {
"Dist::Zilla" : "5.006",
"Dist::Zilla" : "5.013",
"Dist::Zilla::Plugin::Prereqs" : "0",
"Dist::Zilla::Plugin::RemovePrereqs" : "0",
"Dist::Zilla::PluginBundle::DAGOLDEN" : "0.053",
"Dist::Zilla::PluginBundle::DAGOLDEN" : "0.060",
"File::Spec" : "0",
"File::Temp" : "0",
"IO::Handle" : "0",
......@@ -51,6 +51,7 @@
"runtime" : {
"recommends" : {
"HTTP::CookieJar" : "0.001",
"IO::Socket::IP" : "0.25",
"IO::Socket::SSL" : "1.42",
"Mozilla::CA" : "20120823",
"Net::SSLeay" : "1.49"
......@@ -73,7 +74,7 @@
"test" : {
"recommends" : {
"CPAN::Meta" : "0",
"CPAN::Meta::Requirements" : "0"
"CPAN::Meta::Requirements" : "2.120900"
},
"requires" : {
"Data::Dumper" : "0",
......@@ -89,14 +90,15 @@
"IPC::Cmd" : "0",
"List::Util" : "0",
"Test::More" : "0.96",
"open" : "0"
"open" : "0",
"version" : "0"
}
}
},
"provides" : {
"HTTP::Tiny" : {
"file" : "lib/HTTP/Tiny.pm",
"version" : "0.039"
"version" : "0.043"
}
},
"release_status" : "stable",
......@@ -111,7 +113,7 @@
"web" : "https://github.com/chansen/p5-http-tiny"
}
},
"version" : "0.039",
"version" : "0.043",
"x_authority" : "cpan:DAGOLDEN",
"x_contributors" : [
"Alan Gardner <gardner@pythian.com>",
......@@ -120,14 +122,16 @@
"Chris Nehren <apeiron@cpan.org>",
"Chris Weyl <cweyl@alumni.drew.edu>",
"Claes Jakobsson <claes@surfar.nu>",
"Clinton Gormley <clint@traveljury.com>",
"Craig Berry <cberry@cpan.org>",
"David Mitchell <davem@iabyn.com>",
"Edward Zborowski <ed@rubensteintech.com>",
"Jess Robinson <castaway@desert-island.me.uk>",
"Lukas Eklund <leklund@gmail.com>",
"Martin J. Evans <mjegh@ntlworld.com>",
"Martin-Louis Bright <mlbright@gmail.com>",
"Mike Doherty <doherty@cpan.org>",
"Petr P\u00edsa\u0159 <ppisar@redhat.com>",
"Petr Písař <ppisar@redhat.com>",
"Serguei Trouchelle <stro@cpan.org>",
"Syohei YOSHIDA <syohex@gmail.com>",
"Tony Cook <tony@develop-help.com>"
......
......@@ -4,28 +4,29 @@ author:
- 'Christian Hansen <chansen@cpan.org>'
- 'David Golden <dagolden@cpan.org>'
build_requires:
Data::Dumper: 0
Exporter: 0
ExtUtils::MakeMaker: 0
File::Basename: 0
File::Spec: 0
File::Spec::Functions: 0
File::Temp: 0
IO::Dir: 0
IO::File: 0
IO::Socket::INET: 0
IPC::Cmd: 0
List::Util: 0
Test::More: 0.96
open: 0
Data::Dumper: '0'
Exporter: '0'
ExtUtils::MakeMaker: '0'
File::Basename: '0'
File::Spec: '0'
File::Spec::Functions: '0'
File::Temp: '0'
IO::Dir: '0'
IO::File: '0'
IO::Socket::INET: '0'
IPC::Cmd: '0'
List::Util: '0'
Test::More: '0.96'
open: '0'
version: '0'
configure_requires:
ExtUtils::MakeMaker: 6.17
ExtUtils::MakeMaker: '6.17'
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830'
generated_by: 'Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.133380'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
version: '1.4'
name: HTTP-Tiny
no_index:
directory:
......@@ -38,27 +39,28 @@ no_index:
provides:
HTTP::Tiny:
file: lib/HTTP/Tiny.pm
version: 0.039
version: '0.043'
recommends:
HTTP::CookieJar: 0.001
IO::Socket::SSL: 1.42
Mozilla::CA: 20120823
Net::SSLeay: 1.49
HTTP::CookieJar: '0.001'
IO::Socket::IP: '0.25'
IO::Socket::SSL: '1.42'
Mozilla::CA: '20120823'
Net::SSLeay: '1.49'
requires:
Carp: 0
Fcntl: 0
IO::Socket: 0
MIME::Base64: 0
Time::Local: 0
bytes: 0
perl: 5.006
strict: 0
warnings: 0
Carp: '0'
Fcntl: '0'
IO::Socket: '0'
MIME::Base64: '0'
Time::Local: '0'
bytes: '0'
perl: '5.006'
strict: '0'
warnings: '0'
resources:
bugtracker: https://github.com/chansen/p5-http-tiny/issues
homepage: https://github.com/chansen/p5-http-tiny
repository: https://github.com/chansen/p5-http-tiny.git
version: 0.039
version: '0.043'
x_authority: cpan:DAGOLDEN
x_contributors:
- 'Alan Gardner <gardner@pythian.com>'
......@@ -67,11 +69,13 @@ x_contributors:
- 'Chris Nehren <apeiron@cpan.org>'
- 'Chris Weyl <cweyl@alumni.drew.edu>'
- 'Claes Jakobsson <claes@surfar.nu>'
- 'Clinton Gormley <clint@traveljury.com>'
- 'Craig Berry <cberry@cpan.org>'
- 'David Mitchell <davem@iabyn.com>'
- 'Edward Zborowski <ed@rubensteintech.com>'
- 'Jess Robinson <castaway@desert-island.me.uk>'
- 'Lukas Eklund <leklund@gmail.com>'
- 'Martin J. Evans <mjegh@ntlworld.com>'
- 'Martin-Louis Bright <mlbright@gmail.com>'
- 'Mike Doherty <doherty@cpan.org>'
- 'Petr Písař <ppisar@redhat.com>'
......
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.013.
use strict;
use warnings;
......@@ -43,9 +44,10 @@ my %WriteMakefileArgs = (
"IPC::Cmd" => 0,
"List::Util" => 0,
"Test::More" => "0.96",
"open" => 0
"open" => 0,
"version" => 0
},
"VERSION" => "0.039",
"VERSION" => "0.043",
"test" => {
"TESTS" => "t/*.t"
}
......@@ -74,6 +76,7 @@ my %FallbackPrereqs = (
"bytes" => 0,
"open" => 0,
"strict" => 0,
"version" => 0,
"warnings" => 0
);
......
......@@ -2,7 +2,7 @@ NAME
HTTP::Tiny - A small, simple, correct HTTP/1.1 client
VERSION
version 0.039
version 0.043
SYNOPSIS
use HTTP::Tiny;
......@@ -22,12 +22,17 @@ SYNOPSIS
print $response->{content} if length $response->{content};
DESCRIPTION
This is a very simple HTTP/1.1 client, designed for doing simple GET
This is a very simple HTTP/1.1 client, designed for doing simple
requests without the overhead of a large framework like LWP::UserAgent.
It is more correct and more complete than HTTP::Lite. It supports
proxies (currently only non-authenticating ones) and redirection. It
also correctly resumes after EINTR.
proxies and redirection. It also correctly resumes after EINTR.
If IO::Socket::IP 0.25 or later is installed, HTTP::Tiny will use it
instead of IO::Socket::INET for transparent support for both IPv4 and
IPv6.
Cookie support requires HTTP::CookieJar or an equivalent class.
METHODS
new
......@@ -55,6 +60,11 @@ METHODS
The local IP address to bind to
* "keep_alive"
Whether to reuse the last connection (if for the same scheme, host
and port) (defaults to 1)
* "max_redirect"
Maximum number of redirects allowed (defaults to 5)
......@@ -64,9 +74,20 @@ METHODS
Maximum response size (only when not using a data callback). If
defined, responses larger than this will return an exception.
* "http_proxy"
URL of a proxy server to use for HTTP connections (default is
$ENV{http_proxy} if set)
* "https_proxy"
URL of a proxy server to use for HTTPS connections (default is
$ENV{https_proxy} if set)
* "proxy"
URL of a proxy server to use (default is $ENV{http_proxy} if set)
URL of a generic proxy server for both HTTP and HTTPS connections
(default is $ENV{all_proxy} if set)
* "no_proxy"
......@@ -91,6 +112,12 @@ METHODS
pseudo-HTTP status code of 599 and a reason of "Internal Exception". The
content field in the response will contain the text of the exception.
The "keep_alive" parameter enables a persistent connection, but only to
a single destination scheme, host and port. Also, if any
connection-relevant attributes are modified, a persistent connection
will be dropped. If you want persistent connections across multiple
destinations, use multiple HTTP::Tiny objects.
See "SSL SUPPORT" for more on the "verify_SSL" and "SSL_options"
attributes.
......@@ -257,14 +284,14 @@ METHODS
reference, the key/value pairs in the resulting string will be sorted by
key and value for consistent ordering.
To preserve the order (r
SSL SUPPORT
Direct "https" connections are supported only if IO::Socket::SSL 1.56 or
greater and Net::SSLeay 1.49 or greater are installed. An exception will
be thrown if a new enough versions of these modules not installed or if
the SSL encryption fails. There is no support for "https" connections
via proxy (i.e. RFC 2817).
the SSL encryption fails. An "https" connection may be made via an
"http" proxy that supports the CONNECT command (i.e. RFC 2817). You may
not proxy "https" via a proxy that itself requires "https" to
communicate.
SSL provides two distinct capabilities:
......@@ -326,6 +353,32 @@ SSL SUPPORT
controlling the choice of cipher used for the SSL connection. See
IO::Socket::SSL documentation for details.
PROXY SUPPORT
HTTP::Tiny can proxy both "http" and "https" requests. Only Basic proxy
authorization is supported and it must be provided as part of the proxy
URL: "http://user:pass@proxy.example.com/".
HTTP::Tiny supports the following proxy environment variables:
* http_proxy
* https_proxy or HTTPS_PROXY
* all_proxy or ALL_PROXY
Tunnelling "https" over an "http" proxy using the CONNECT method is
supported. If your proxy uses "https" itself, you can not tunnel "https"
over it.
Be warned that proxying an "https" connection opens you to the risk of a
man-in-the-middle attack by the proxy server.
The "no_proxy" environment variable is supported in the format of a
comma-separated list of domain extensions proxy should not be used for.
Proxy arguments passed to "new" will override their corresponding
environment variables.
LIMITATIONS
HTTP::Tiny is *conditionally compliant* with the HTTP/1.1 specification
<http://www.w3.org/Protocols/rfc2616/rfc2616.html>. It attempts to meet
......@@ -348,21 +401,6 @@ LIMITATIONS
into a 'GET' redirection, as mandated by the specification. There is
no automatic support for status 305 ("Use proxy") redirections.
* Persistent connections are not supported. The "Connection" header
will always be set to "close".
* Cookie support requires HTTP::CookieJar or an equivalent class.
* Only the "http_proxy" environment variable is supported in the
format "http://HOST:PORT/". If a "proxy" argument is passed to "new"
(including undef), then the "http_proxy" environment variable is
ignored.
* "no_proxy" environment variable is supported in the format
comma-separated list of domain extensions proxy should not be used
for. If a "no_proxy" argument is passed to "new", then the
"no_proxy" environment variable is ignored.
* There is no provision for delaying a request body using an "Expect"
header. Unexpected "1XX" responses are silently ignored as per the
specification.
......@@ -372,14 +410,12 @@ LIMITATIONS
* There is no support for a Request-URI of '*' for the 'OPTIONS'
request.
* There is no support for IPv6 of any kind.
Despite the limitations listed above, HTTP::Tiny is considered nearly
feature-complete. If there are enhancements unrelated to the underlying
transport, please consider them for HTTP::Tiny::UA instead.
Despite the limitations listed above, HTTP::Tiny is considered
feature-complete. New feature requests should be directed to
HTTP::Tiny::UA.
SEE ALSO
* HTTP::Tiny::UA Higher level UA features for HTTP::Tiny
* HTTP::Tiny::UA - Higher level UA features for HTTP::Tiny
* HTTP::Thin - HTTP::Tiny wrapper with HTTP::Request/HTTP::Response
compatibility
......@@ -387,6 +423,8 @@ SEE ALSO
* HTTP::Tiny::Mech - Wrap WWW::Mechanize instance in HTTP::Tiny
compatible interface
* IO::Socket::IP - Required for IPv6 support
* IO::Socket::SSL - Required for SSL support
* LWP::UserAgent - If HTTP::Tiny isn't enough for you, this is the
......@@ -428,6 +466,8 @@ CONTRIBUTORS
* Claes Jakobsson <claes@surfar.nu>
* Clinton Gormley <clint@traveljury.com>
* Craig Berry <cberry@cpan.org>
* David Mitchell <davem@iabyn.com>
......@@ -438,6 +478,8 @@ CONTRIBUTORS
* Lukas Eklund <leklund@gmail.com>
* Martin J. Evans <mjegh@ntlworld.com>
* Martin-Louis Bright <mlbright@gmail.com>
* Mike Doherty <doherty@cpan.org>
......@@ -451,7 +493,7 @@ CONTRIBUTORS
* Tony Cook <tony@develop-help.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Christian Hansen.
This software is copyright (c) 2014 by Christian Hansen.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......
......@@ -8,6 +8,7 @@ requires "perl" => "5.006";
requires "strict" => "0";
requires "warnings" => "0";
recommends "HTTP::CookieJar" => "0.001";
recommends "IO::Socket::IP" => "0.25";
recommends "IO::Socket::SSL" => "1.42";
recommends "Mozilla::CA" => "20120823";
recommends "Net::SSLeay" => "1.49";
......@@ -28,11 +29,12 @@ on 'test' => sub {
requires "List::Util" => "0";
requires "Test::More" => "0.96";
requires "open" => "0";
requires "version" => "0";
};
on 'test' => sub {
recommends "CPAN::Meta" => "0";
recommends "CPAN::Meta::Requirements" => "0";
recommends "CPAN::Meta::Requirements" => "2.120900";
};
on 'configure' => sub {
......@@ -40,10 +42,10 @@ on 'configure' => sub {
};
on 'develop' => sub {
requires "Dist::Zilla" => "5.006";
requires "Dist::Zilla" => "5.013";
requires "Dist::Zilla::Plugin::Prereqs" => "0";
requires "Dist::Zilla::Plugin::RemovePrereqs" => "0";
requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.053";
requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.060";
requires "File::Spec" => "0";
requires "File::Temp" => "0";
requires "IO::Handle" => "0";
......
......@@ -5,19 +5,22 @@ license = Perl_5
copyright_holder = Christian Hansen
[@DAGOLDEN]
:version = 0.053
:version = 0.060
stopwords = CA
stopwords = UA
stopwords = proxying
[RemovePrereqs]
remove = Errno
remove = HTTP::CookieJar
remove = IO::Socket::IP
remove = IO::Socket::SSL
remove = Mozilla::CA
remove = Net::SSLeay
[Prereqs / Recommends]
HTTP::CookieJar = 0.001
IO::Socket::IP = 0.25
IO::Socket::SSL = 1.42
Mozilla::CA = 20120823
Net::SSLeay = 1.49
......
This diff is collapsed.
......@@ -7,6 +7,9 @@ allow = $@ $!
[TestingAndDebugging::ProhibitNoStrict]
allow = refs
[Variables::ProhibitEvilVariables]
variables = $DB::single
# Turn these off
[-BuiltinFunctions::ProhibitStringyEval]
[-ControlStructures::ProhibitPostfixControls]
......
......@@ -3,83 +3,147 @@
use strict;
use warnings;
# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.010
# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.013
use Test::More tests => 1;
use ExtUtils::MakeMaker;
use File::Spec::Functions;
use List::Util qw/max/;
use version;
# hide optional CPAN::Meta modules from prereq scanner
# and check if they are available
my $cpan_meta = "CPAN::Meta";
my $cpan_meta_req = "CPAN::Meta::Requirements";
my $HAS_CPAN_META = eval "require $cpan_meta"; ## no critic
my $HAS_CPAN_META_REQ = eval "require $cpan_meta_req; $cpan_meta_req->VERSION('2.120900')";
# Verify requirements?
my $DO_VERIFY_PREREQS = 1;
sub _merge_requires {
my ($collector, $prereqs) = @_;
for my $phase ( qw/configure build test runtime develop/ ) {
next unless exists $prereqs->{$phase};
if ( my $req = $prereqs->{$phase}{'requires'} ) {
my $cmr = CPAN::Meta::Requirements->from_string_hash( $req );
$collector->add_requirements( $cmr );
}
}
}
my %include = map {; $_ => 1 } qw(
my @modules = qw(
CPAN::Meta
CPAN::Meta::Requirements
Carp
Data::Dumper
Exporter
ExtUtils::MakeMaker
Fcntl
File::Basename
File::Spec
File::Spec::Functions
File::Temp
HTTP::CookieJar
IO::Dir
IO::File
IO::Socket
IO::Socket::INET
IO::Socket::SSL
IPC::Cmd
List::Util
MIME::Base64
Mozilla::CA
Net::SSLeay
Test::More
Time::Local
bytes
open
perl
strict
warnings
);
my %exclude = map {; $_ => 1 } qw(
);
my ($source) = grep { -f $_ } qw/MYMETA.json MYMETA.yml META.json/;