This queue is for tickets about the Catalyst-Devel CPAN distribution.

Report information
The Basics
Id:
75068
Status:
new
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
rrwo [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Wishlist
Broken in:
1.36
Fixed in:
(no value)



Subject: Test script to detect missing modules
I've run into an error that turned out to be a colleague renaming a module used, but the corresponding configuration was not updated. To prevent that, I've written a test script that checks the configuration for modules which may not exist. This might be a good thing to add by default to a new installation. Something like: use 5.10.0; use strict; use warnings; use Test::More 0.61; use lib 'lib'; use_ok 'MyApp'; my $config = MyApp->config; foreach my $key (%{ $config }) { if (ref($config->{$key}) eq 'HASH') { if ($key =~ /^Plugin::/) { use_ok "Catalyst::${key}" or BAIL_OUT "Missing module"; } elsif ($key =~ /^(Model|View|Controller)::/) { my $name = $config->{name} // "MyApp"; use_ok "${name}::${key}" or BAIL_OUT "Missing module"; } } } done_testing;


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.