6 require Module::Pluggable::Object;
9 # Get a list of all Catalyst:: packages in blib via M::P::O
12 # problem with @INC on win32, see:
13 # http://rt.cpan.org/Ticket/Display.html?id=26452
14 if ($^O eq 'MSWin32') { require Win32; Win32::GetCwd(); }
16 local @INC = grep {/blib/} @INC;
19 Module::Pluggable::Object->new(search_path => ['Catalyst'])->plugins,
23 # plan one test per found package name
24 plan tests => scalar @cat_mods;
26 # Try to calculate the C3 MRO for each package
28 # In the case that the initial require fails (as in
29 # Catalyst::Engine::FastCGI when FCGI is not installed),
30 # the calculateMRO eval will not error out, which is
31 # effectively a test skip.
33 foreach my $cat_mod (@cat_mods) {
34 eval " require $cat_mod ";
35 eval { mro::get_linear_isa($cat_mod, 'c3') };
36 ok(!$@, "calculateMRO for $cat_mod: $@");