1 package Catalyst::AttrContainer;
4 use base qw/Class::Data::Inheritable Class::Accessor::Fast/;
6 use Catalyst::Exception;
9 __PACKAGE__->mk_classdata($_) for qw/_attr_cache _action_cache/;
10 __PACKAGE__->_attr_cache( {} );
11 __PACKAGE__->_action_cache( [] );
13 # note - see attributes(3pm)
14 sub MODIFY_CODE_ATTRIBUTES {
15 my ( $class, $code, @attrs ) = @_;
16 $class->_attr_cache( { %{ $class->_attr_cache }, $code => [@attrs] } );
17 $class->_action_cache(
18 [ @{ $class->_action_cache }, [ $code, [@attrs] ] ] );
22 sub FETCH_CODE_ATTRIBUTES { $_[0]->_attr_cache->{ $_[1] } || () }
26 Catalyst::AttrContainer
36 =item FETCH_CODE_ATTRIBUTES
38 =item MODIFY_CODE_ATTRIBUTES
48 Sebastian Riedel, C<sri@cpan.org>
49 Marcus Ramberg, C<mramberg@cpan.org>
53 This program is free software, you can redistribute it and/or modify it under
54 the same terms as Perl itself.