And lets have a test that the reflector works in interface role mode
[catagits/CatalystX-DynamicComponent.git] / t / lib / SomeModelClass.pm
CommitLineData
61ef2dee 1package SomeModelClassInterface;
2use Moose::Role;
3use namespace::autoclean;
4
5requires 'say_hello';
6
7d26c84b 7package SomeModelClass;
8use Moose;
8c228ad4 9use CatalystX::ControllerGeneratingModel;
046d763d 10use namespace::autoclean;
7d26c84b 11
12# Note trivial calling convention.
13# Apply MX::Method::Signatures and MX::Types::Structured to be less lame.
14
15# Introspection should only reflect methods which satisfy the calling convention
16# This is left as an exercise to the reader. :)
17
8c228ad4 18command say_hello => sub {
7d26c84b 19 my ($self, $name) = @_;
20 return("Hello $name");
8c228ad4 21};
7d26c84b 22
61ef2dee 23with 'SomeModelClassInterface';
24
7d26c84b 25__PACKAGE__->meta->make_immutable;
26