diff options
Diffstat (limited to 'cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker')
6 files changed, 67 insertions, 17 deletions
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm index 1b92bef077..587076678c 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm @@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Config; use strict; -our $VERSION = '7.18_01'; +our $VERSION = '7.22'; $VERSION = eval $VERSION; use Config (); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod index 6f59192ab0..e965f33582 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::FAQ; -our $VERSION = '7.18'; +our $VERSION = '7.22'; $VERSION = eval $VERSION; 1; @@ -120,6 +120,29 @@ have multiple modules to work with. It also ensures that the module goes through its full installation process which may modify it. Again, L<local::lib> may assist you here. +=item How can I organize tests into subdirectories and have them run? + +Let's take the following test directory structure: + + t/foo/sometest.t + t/bar/othertest.t + t/bar/baz/anothertest.t + +Now, inside of the C<WriteMakeFile()> function in your F<Makefile.PL>, specify +where your tests are located with the C<test> directive: + + test => {TESTS => 't/*.t t/*/*.t t/*/*/*.t'} + +The first entry in the string will run all tests in the top-level F<t/> +directory. The second will run all test files located in any subdirectory under +F<t/>. The third, runs all test files within any subdirectory within any other +subdirectory located under F<t/>. + +Note that you do not have to use wildcards. You can specify explicitly which +subdirectories to run tests in: + + test => {TESTS => 't/*.t t/foo/*.t t/bar/baz/*.t'} + =item PREFIX vs INSTALL_BASE from Module::Build::Cookbook The behavior of PREFIX is complicated and depends closely on how your diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm index 21f5974985..11b09875e1 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm @@ -1,7 +1,7 @@ package ExtUtils::MakeMaker::Locale; use strict; -our $VERSION = "7.18"; +our $VERSION = "7.22"; $VERSION = eval $VERSION; use base 'Exporter'; @@ -28,11 +28,8 @@ sub _init { eval { unless (defined &GetConsoleCP) { require Win32; - # no point falling back to Win32::GetConsoleCP from this - # as added same time, 0.45 - eval { Win32::GetConsoleCP() }; # manually "import" it since Win32->import refuses - *GetConsoleCP = sub { &Win32::GetConsoleCP } unless $@; + *GetConsoleCP = sub { &Win32::GetConsoleCP } if defined &Win32::GetConsoleCP; } unless (defined &GetConsoleCP) { require Win32::API; @@ -52,18 +49,17 @@ sub _init { require Win32; eval { Win32::GetConsoleCP() }; # manually "import" it since Win32->import refuses - *GetInputCP = sub { &Win32::GetConsoleCP } unless $@; - *GetOutputCP = sub { &Win32::GetConsoleOutputCP } unless $@; + *GetInputCP = sub { &Win32::GetConsoleCP } if defined &Win32::GetConsoleCP; + *GetOutputCP = sub { &Win32::GetConsoleOutputCP } if defined &Win32::GetConsoleOutputCP; }; unless (defined &GetInputCP) { eval { # try Win32::Console module for codepage to use require Win32::Console; - eval { Win32::Console::InputCP() }; *GetInputCP = sub { &Win32::Console::InputCP } - unless $@; + if defined &Win32::Console::InputCP; *GetOutputCP = sub { &Win32::Console::OutputCP } - unless $@; + if defined &Win32::Console::OutputCP; }; } unless (defined &GetInputCP) { diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod index 976345f356..4130ded2ea 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::Tutorial; -our $VERSION = '7.18'; +our $VERSION = '7.22'; $VERSION = eval $VERSION; @@ -104,8 +104,39 @@ is F<lib/Foo/Bar.pm>. =item t/ Tests for your modules go here. Each test filename ends with a .t. -So F<t/foo.t>/ 'make test' will run these tests. The directory is flat, -you cannot, for example, have t/foo/bar.t run by 'make test'. +So F<t/foo.t> 'make test' will run these tests. + +Typically, the F<t/> test directory is flat, with all test files located +directly within it. However, you can nest tests within subdirectories, for +example: + + t/foo/subdir_test.t + +To do this, you need to inform C<WriteMakeFile()> in your I<Makefile.PL> file +in the following fashion: + + test => {TESTS => 't/*.t t/*/*.t'} + +That will run all tests in F<t/>, as well as all tests in all subdirectories +that reside under F<t/>. You can nest as deeply as makes sense for your project. +Simply add another entry in the test location string. For example, to test: + + t/foo/bar/subdir_test.t + +You would use the following C<test> directive: + + test => {TESTS => 't/*.t t/*/*/*.t} + +Note that in the above example, tests in the first subdirectory will not be +run. To run all tests in the intermediary subdirectory preceeding the one +the test files are in, you need to explicitly note it: + + test => {TESTS => 't/*.t t/*/*.t t/*/*/*.t'} + +You don't need to specify wildcards if you only want to test within specific +subdirectories. The following example will only run tests in F<t/foo>: + + test => {TESTS => 't/foo/*.t'} Tests are run from the top level of your distribution. So inside a test you would refer to ./lib to enter the lib directory, for example. diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm index 6073163ead..e80d1b05d7 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version.pm @@ -15,7 +15,7 @@ use strict; use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); -$VERSION = '7.18_01'; +$VERSION = '7.22'; $VERSION = eval $VERSION; $CLASS = 'version'; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm index 8188fac118..59be0adf30 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/version/regex.pm @@ -10,7 +10,7 @@ use strict; use vars qw($VERSION $CLASS $STRICT $LAX); -$VERSION = '7.18_01'; +$VERSION = '7.22'; $VERSION = eval $VERSION; #--------------------------------------------------------------------------# |