3 use constant NEED_TESTING => $ENV{RELEASE_TESTING} || (grep { $_ eq '--test' } @ARGV);
4 use if !NEED_TESTING, 'Test::More' => (skip_all => "for release testing");
8 use Test::Requires qw(Test::DependentModules);
11 use Test::DependentModules qw(test_module);
15 note("Testing user modules which depend on Mouse");
17 $ENV{PERL_TEST_DM_LOG_DIR} = abs_path('.');
18 delete $ENV{ANY_MOOSE}; # use Mouse by default
22 MouseX::Types::Path::Class
24 MouseX::AttributeHelpers
26 MouseX::ConfigFromFile
31 HTTP::Engine::Middleware
37 test_module($_) for @modules;
44 $ENV{PERL5OPT} = '-Mblib' if exists $INC{'blib.pm'};
45 #$ENV{PERL_CPANM_DEV} = 1;
50 use Test::Requires qw(App::cpanminus::script);
54 package Test::UserModules;
55 our @ISA = qw(App::cpanminus::script);
59 $self->hook('test_user_modules', 'install_success' => \&_install_success);
60 $self->hook('test_user_modules', 'build_failure' => \&_build_failure);
65 my($self, @messages) = @_;
66 #Test::More->builder->note(@messages);
70 sub _install_success {
72 Test::More->builder->ok(1, "install $args->{module}");
77 Test::More->builder->ok(0, "install $args->{module} ($args->{message})");
81 # See also http://cpants.perl.org/dist/used_by/Any-Moose
83 my @user_modules = qw(
85 MouseX::Types::Path::Class
87 MouseX::AttributeHelpers
89 MouseX::ConfigFromFile
94 HTTP::Engine::Middleware
96 git://github.com/typester/ark-perl.git
101 my $t = Test::UserModules->new();
102 $t->parse_options(@user_modules);