use HTTP::Tiny;
use MetaCPAN::API::Tiny;
-my ($help, $man, $quiet, $force, $recommend, $host);
+my ($help, $man, $quiet, $force, $recommend, $test, $host);
my $target = 1;
GetOptions( 'help|?' => \$help,
'man' => \$man,
'force|f' => \$force,
'host!' => \$host,
'target!' => \$target,
- 'recommend' => \$recommend
+ 'recommend' => \$recommend,
+ 'test' => \$test
) or pod2usage(-exitval => 1);
pod2usage(-exitval => 0) if $help;
pod2usage(-exitval => 0, -verbose => 2) if $man;
next if $modname eq q{perl};
next if $modname =~ m|^Alien|;
next if $modname =~ m|^Win32|;
+ next if !$test && $modname =~ m|^Test|;
next if Module::CoreList::first_release( $modname );
# we could use the host Module::CoreList data, because host perl and
# target perl have the same major version
next if ${$dep}{phase} eq q{develop};
- next if ${$dep}{phase} eq q{test};
+ next if !$test && ${$dep}{phase} eq q{test};
next if !$recommend && ${$dep}{relationship} ne q{requires};
my $distname = $mcpan->module( $modname )->{distribution};
if (${$dep}{phase} eq q{runtime}) {
-target/-notarget
-host/-nohost
-recommend
+ -test
=head1 OPTIONS
Adds I<recommended> dependencies.
+=item B<-test>
+
+Adds dependencies for test.
+
=back
=head1 DESCRIPTION