4 # FIXME - This is all fairly gross and hacky. Surely there should be a nicer
5 # more generic approach.
8 use lib ("$Bin/lib", "$Bin/../lib");
10 use List::MoreUtils qw/any all/;
12 setmoduledirs("$Bin/../lib", "$Bin/lib");
14 use Test::More tests => 5;
19 @modules = (useall('CatalystX'), useall('DynamicAppDemo'));
23 ok ! any( sub { ! $_->isa('Moose::Object') },
24 grep { $_->meta !~ /::Role/ }
25 grep { ! $_->can('import') }
30 ok ! any(sub { $_->can('has') && warn("$_ can has") && 1; }, @modules),
31 'However, no lolcat to be found';
33 ok all( sub { $_->meta->is_immutable },
34 grep { $_->meta !~ /::Role/ } # Skip roles, ewww. I would test
35 # ->isa('Moose::Role') but that fails
36 # for parameterised roles..
37 grep { ! $_->can('import') } # Skip exporters
39 'And all classes are immutable';