X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAttrContainer.pm;h=921a886931aecfad3fa448db86273272d397245e;hb=b99ff5d87e80f13652bf374e2ce8f10c7156ac6e;hp=ddfe0ab22cc09f3b5cec586202fb864610cbcc15;hpb=e7dc25cd71e0b09ba2a457b240d5d922e0279507;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/AttrContainer.pm b/lib/Catalyst/AttrContainer.pm index ddfe0ab..921a886 100644 --- a/lib/Catalyst/AttrContainer.pm +++ b/lib/Catalyst/AttrContainer.pm @@ -1,22 +1,14 @@ package Catalyst::AttrContainer; use Moose; -#use strict; -#use base qw/Class::Accessor::Fast Class::Data::Inheritable/; - use Catalyst::Exception; -use NEXT; +use Scalar::Util 'blessed'; +with 'Catalyst::ClassData'; -#dont want to ISA a C::D::I -use Class::Data::Inheritable; -{ - my $mk_classdata = Class::Data::Inheritable->can('mk_classdata'); - __PACKAGE__->meta->add_method(mk_classdata => $mk_classdata); -} +no Moose; -__PACKAGE__->mk_classdata($_) for qw/_attr_cache _action_cache/; -__PACKAGE__->_attr_cache( {} ); -__PACKAGE__->_action_cache( [] ); +__PACKAGE__->mk_classdata(_attr_cache => {} ); +__PACKAGE__->mk_classdata( _action_cache => [] ); # note - see attributes(3pm) sub MODIFY_CODE_ATTRIBUTES { @@ -31,13 +23,13 @@ sub FETCH_CODE_ATTRIBUTES { $_[0]->_attr_cache->{ $_[1] } || () } =head1 NAME -Catalyst::AttrContainer +Catalyst::AttrContainer - Handles code attribute storage and caching =head1 SYNOPSIS =head1 DESCRIPTION -This class sets up the code attribute cache. It's a base class for +This class sets up the code attribute cache. It's a base class for L. =head1 METHODS @@ -55,10 +47,9 @@ Attribute function. See attributes(3pm) L L. -=head1 AUTHOR +=head1 AUTHORS -Sebastian Riedel, C -Marcus Ramberg, C +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT