| Module-Release documentation | Contained in the Module-Release distribution. |
Module::Release::Prereq - Check pre-requisites list in build file
The release script automatically loads this module and checks your prerequisite declaration against what you actaully used in the tests.
Run `perl -MTest::Prereq -eprereq_ok`. If it doesn't see "^ok 1" it dies.
It looks in local_name to get the name of the distribution file.
This source is in Github:
git://github.com/briandfoy/module-release.git
brian d foy, <bdfoy@cpan.org>
Copyright (c) 2007-2009, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.
| Module-Release documentation | Contained in the Module-Release distribution. |
package Module::Release::Prereq; use strict; use warnings; use base qw(Exporter); use vars qw($VERSION); our @EXPORT = qw( check_prereqs _get_prereq_ignore_list ); $VERSION = '2.05';
sub check_prereqs { eval "require Test::Prereq; 1 " or $_[0]->_die( "You need Test::Prereq to check prereqs" ); $_[0]->_print( "Checking prereqs... " ); my $perl = $_[0]->{perl}; my @ignore = $_[0]->_get_prereq_ignore_list; my $messages = $_[0]->run( qq|$perl -MTest::Prereq -e "prereq_ok( undef, undef, [ qw(@ignore) ] )"| ); $_[0]->_die( "Prereqs had a problem:\n$messages\n" ) unless $messages =~ m/^ok 1 - Prereq test/m; $_[0]->_print( "done\n" ); } sub _get_prereq_ignore_list { my @ignore = split /\s+/, $_[0]->config->ignore_prereqs || ''; }
1;