#!perl

use strict;
use warnings;
require App::Prove;

my $app = App::Prove->new;
$app->process_args(@ARGV);
$ENV{PERL5OPT} = ($ENV{PERL5OPT} ? " " : "").
    "-Mlib::prereqs::only=RuntimeRecommends,1,TestRecommends,1,RuntimeSuggests,1,TestSuggests,1,debug,".($ENV{DEBUG} ? 1:0);
exit( $app->run ? 0 : 1 );

# ABSTRACT: prove + lib::prereqs::only (requires + recommends + suggests)
# PODNAME: prove-with-prereqs-rs-only

__END__

=pod

=encoding UTF-8

=head1 NAME

prove-with-prereqs-rs-only - prove + lib::prereqs::only (requires + recommends + suggests)

=head1 VERSION

This document describes version 0.001 of prove-with-prereqs-rs-only (from Perl distribution App-ProveWithPrereqsOnly), released on 2016-07-08.

=head1 SYNOPSIS

Use like you would use L<prove>:

 % prove-with-prereqs-rs-only ...

=head1 DESCRIPTION

This is a shortcut for:

 % PERL5OPT=-Mlib::prereqs::only=RuntimeRecommends,1,TestRecommends,1,RuntimeSuggests,1,TestSuggests,1 prove ...

It runs your test suite but will only allow loading of core modules, modules
under L<lib/>, and modules specified as prereqs (runtime & test requires +
recommends + suggests) in F<dist.ini>. This is a cheap way to simulate a
"vanilla" perl installation without having to prepare e.g. a new perlbrew
instance.

=head1 ENVIRONMENT

=head2 DEBUG => bool

Will be passed as C<debug> option to lib::prereqs::only.

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-ProveWithPrereqsOnly>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-App-ProveWithPrereqsOnly>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-ProveWithPrereqsOnly>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 SEE ALSO

L<prove>

L<lib::prereqs::only>

L<Dist::Zilla>

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
