prevent immutable creating new() methods for Reaction metaclasses
[catagits/Reaction.git] / lib / Reaction / Meta / InterfaceModel / Action / Class.pm
1 package Reaction::Meta::InterfaceModel::Action::Class;
2
3 use Reaction::Class;
4 use aliased 'Reaction::Meta::InterfaceModel::Action::ParameterAttribute';
5
6 class Class is 'Reaction::Meta::Class', which {
7
8   implements new => as { shift->SUPER::new(@_) };
9
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   
25 1;
26
27 =head1 NAME
28
29 Reaction::Meta::InterfaceModel::Action::Class
30
31 =head1 DESCRIPTION
32
33 =head2 parameter_attributes
34
35 =head1 AUTHORS
36
37 See L<Reaction::Class> for authors.
38
39 =head1 LICENSE
40
41 See L<Reaction::Class> for the license.
42
43 =cut