package Module::Install::PRIVATE; use strict 'vars'; use Module::Install::Makefile; use vars qw{@ISA}; BEGIN { @ISA = qw{Module::Install::Makefile}; } my %test_dir = (); sub _wanted_t { /\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1; } sub tests_recursive_follow_symlinks { my $self = shift; if ( $self->tests ) { die "tests_recursive will not work if tests are already defined"; } my $dir = shift || 't'; unless ( -d $dir ) { die "tests_recursive dir '$dir' does not exist"; } require File::Find; %test_dir = (); # call to find modified to use 'follow' File::Find::find( { wanted => \&_wanted_t, follow => 1 }, $dir ); $self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir ); } 1;