prevent immutable creating new() methods for Reaction metaclasses
[catagits/Reaction.git] / lib / Reaction / Meta / InterfaceModel / Action / Class.pm
CommitLineData
7adfd53f 1package Reaction::Meta::InterfaceModel::Action::Class;
2
3use Reaction::Class;
4use aliased 'Reaction::Meta::InterfaceModel::Action::ParameterAttribute';
5
6class Class is 'Reaction::Meta::Class', which {
7
6a00914b 8 implements new => as { shift->SUPER::new(@_) };
9
7adfd53f 10 around initialize => sub {
11 my $super = shift;
12 my $class = shift;
13 my $pkg = shift;
14 $super->($class, $pkg, attribute_metaclass => ParameterAttribute, @_);
15 };
16
17 implements parameter_attributes => as {
18 my $self = shift;
19 return grep { $_->isa(ParameterAttribute) }
20 $self->compute_all_applicable_attributes;
21 };
22
23};
24
251;
26
27=head1 NAME
28
29Reaction::Meta::InterfaceModel::Action::Class
30
31=head1 DESCRIPTION
32
33=head2 parameter_attributes
34
35=head1 AUTHORS
36
37See L<Reaction::Class> for authors.
38
39=head1 LICENSE
40
41See L<Reaction::Class> for the license.
42
43=cut