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('.');
21 MouseX::Types::Path::Class
23 MouseX::AttributeHelpers
25 MouseX::ConfigFromFile
30 HTTP::Engine::Middleware
36 test_module($_) for @modules;
43 $ENV{PERL5OPT} = '-Mblib' if exists $INC{'blib.pm'};
44 #$ENV{PERL_CPANM_DEV} = 1;
49 use Test::Requires qw(App::cpanminus::script);
53 package Test::UserModules;
54 our @ISA = qw(App::cpanminus::script);
58 $self->hook('test_user_modules', 'install_success' => \&_install_success);
59 $self->hook('test_user_modules', 'build_failure' => \&_build_failure);
64 my($self, @messages) = @_;
65 #Test::More->builder->note(@messages);
69 sub _install_success {
71 Test::More->builder->ok(1, "install $args->{module}");
76 Test::More->builder->ok(0, "install $args->{module} ($args->{message})");
80 # See also http://cpants.perl.org/dist/used_by/Any-Moose
82 my @user_modules = qw(
84 MouseX::Types::Path::Class
86 MouseX::AttributeHelpers
88 MouseX::ConfigFromFile
93 HTTP::Engine::Middleware
95 git://github.com/typester/ark-perl.git
100 my $t = Test::UserModules->new();
101 $t->parse_options(@user_modules);