[Catalyst-commits] r7950 - in Catalyst-Runtime/5.80/trunk: .
lib/Catalyst
groditi at dev.catalyst.perl.org
groditi at dev.catalyst.perl.org
Mon Jun 23 21:58:30 BST 2008
Author: groditi
Date: 2008-06-23 21:58:30 +0100 (Mon, 23 Jun 2008)
New Revision: 7950
Modified:
Catalyst-Runtime/5.80/trunk/
Catalyst-Runtime/5.80/trunk/Makefile.PL
Catalyst-Runtime/5.80/trunk/lib/Catalyst/AttrContainer.pm
Log:
r16972 at martha (orig r7495): groditi | 2008-03-14 18:25:44 -0400
AttrContainer and additional dep for it
Property changes on: Catalyst-Runtime/5.80/trunk
___________________________________________________________________
Name: svk:merge
- 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:7576
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7494
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
+ 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:7576
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7495
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
Modified: Catalyst-Runtime/5.80/trunk/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/trunk/Makefile.PL 2008-06-23 20:58:23 UTC (rev 7949)
+++ Catalyst-Runtime/5.80/trunk/Makefile.PL 2008-06-23 20:58:30 UTC (rev 7950)
@@ -1,11 +1,15 @@
use inc::Module::Install 0.64;
-use 5.008001;
+use 5.008001;
perl_version '5.8.1';
name 'Catalyst-Runtime';
all_from 'lib/Catalyst/Runtime.pm';
+#from Moose port:
+requires 'Moose'; #version tbd.
+requires 'MooseX::ClassAttribute'; #version tbd
+
requires 'perl' => '5.8.1';
requires 'Carp';
requires 'Class::Accessor::Fast';
@@ -38,7 +42,7 @@
build_requires 'Test::Pod' => 1.14;
build_requires 'Test::Pod::Coverage' => 1.04;
- if ($^O eq 'darwin') {
+ if ($^O eq 'darwin') {
my $osx_ver = `/usr/bin/sw_vers -productVersion`;
chomp $osx_ver;
@@ -48,7 +52,7 @@
makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
qq{ echo "You must set the ENV variable $attr to true,"; }.
- ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
+ ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
}
}
@@ -68,7 +72,7 @@
perl -MCPANPLUS -e 'install Catalyst::Devel' # or
perl -MCPAN -e 'install Catalyst::Devel'
- To get some commonly used plugins, as well as the TT view and DBIC
+ To get some commonly used plugins, as well as the TT view and DBIC
model, install Task::Catalyst in the same way.
Have fun!
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/AttrContainer.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/AttrContainer.pm 2008-06-23 20:58:23 UTC (rev 7949)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/AttrContainer.pm 2008-06-23 20:58:30 UTC (rev 7950)
@@ -1,19 +1,28 @@
package Catalyst::AttrContainer;
-use strict;
-use base qw/Class::Accessor::Fast Class::Data::Inheritable/;
-
+use Moose;
+use MooseX::ClassAttribute;
use Catalyst::Exception;
-use NEXT;
-__PACKAGE__->mk_classdata($_) for qw/_attr_cache _action_cache/;
-__PACKAGE__->_attr_cache( {} );
-__PACKAGE__->_action_cache( [] );
+class_has _attr_cache => (
+ is => 'rw',
+ isa => 'HashRef',
+ required => 1,
+ default => sub{{}}
+ );
+clas_has _action_cache => (
+ is => 'rw',
+ isa => 'ArrayRef',
+ required => 1,
+ default => sub{ [] }
+ );
# note - see attributes(3pm)
sub MODIFY_CODE_ATTRIBUTES {
my ( $class, $code, @attrs ) = @_;
+ #can't the below just be $class->_attr_cache->{$code} = \@attrs; ?
$class->_attr_cache( { %{ $class->_attr_cache }, $code => [@attrs] } );
+ #why can't this just be push @{$class->_action_cache}, [$code, \@attrs] ?
$class->_action_cache(
[ @{ $class->_action_cache }, [ $code, [@attrs] ] ] );
return ();
@@ -29,7 +38,7 @@
=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<Catalyst::Controller>.
=head1 METHODS
More information about the Catalyst-commits
mailing list