![]() |
![]()
| ![]() |
![]()
NAMETest::Prereq - check if Makefile.PL has the right pre-requisites SYNOPSIS# if you use Makefile.PL use Test::More; eval "use Test::Prereq"; plan skip_all => "Test::Prereq required to test dependencies" if $@; prereq_ok(); # if you use Module::Build use Test::More; eval "use Test::Prereq::Build"; plan skip_all => "Test::Prereq::Build required to test dependencies" if $@; prereq_ok(); # or from the command line for a one-off check perl -MTest::Prereq -eprereq_ok #The prerequisites test take quite some time so the following construct is #recommended for non-author testers use Test::More; eval "use Test::Prereq::Build"; my $msg; if ($@) { $msg = 'Test::Prereq::Build required to test dependencies'; } elsif (not $ENV{TEST_AUTHOR}) { $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.'; } plan skip_all => $msg if $msg; prereq_ok(); DESCRIPTIONThe prereq_ok() function examines the modules it finds in blib/lib/, blib/script, and the test files it finds in t/ (and test.pl). It figures out which modules they use and compares that list of modules to those in the "PREREQ_PM" section of Makefile.PL. If you use "Module::Build" instead, see Test::Prereq::Build instead. Warning about redefining ExtUtils::MakeMaker::WriteMakefile"Test::Prereq" has its own version of "ExtUtils::MakeMaker::WriteMakefile" so it can run the Makefile.PL and get the argument list of that function. You may see warnings about this. FUNCTIONS
TO DO
SOURCE AVAILABILITYThis source is in Github: http://github.com/briandfoy/test-prereq CONTRIBUTORSMany thanks to: Andy Lester, Slavin Rezić, Randal Schwartz, Iain Truskett, Dylan Martin AUTHORbrian d foy, "<briandfoy@pobox.com>" COPYRIGHT and LICENSECopyright © 2002-2025, brian d foy <briandfoy@pobox.com>. All rights reserved. This software is available under the Artistic License 2.
|