[Catalyst-commits] r10236 - in trunk/Catalyst-Model-DBIC-Schema: .
lib/Catalyst/Model/DBIC
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Fri May 22 05:13:12 GMT 2009
Author: caelum
Date: 2009-05-22 05:13:12 +0000 (Fri, 22 May 2009)
New Revision: 10236
Modified:
trunk/Catalyst-Model-DBIC-Schema/Makefile.PL
trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm
Log:
DBIC::Schema - remove MX::ClassAttribute
Modified: trunk/Catalyst-Model-DBIC-Schema/Makefile.PL
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/Makefile.PL 2009-05-22 04:41:03 UTC (rev 10235)
+++ trunk/Catalyst-Model-DBIC-Schema/Makefile.PL 2009-05-22 05:13:12 UTC (rev 10236)
@@ -7,7 +7,6 @@
requires 'Catalyst::Runtime' => '5.80003';
requires 'Moose';
requires 'Moose::Autobox';
-requires 'MooseX::ClassAttribute';
requires 'MooseX::Types';
requires 'MooseX::Object::Pluggable' => '0.0011';
requires 'namespace::clean';
Modified: trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm 2009-05-22 04:41:03 UTC (rev 10235)
+++ trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm 2009-05-22 05:13:12 UTC (rev 10236)
@@ -381,8 +381,6 @@
=cut
-class_has 'composed_schema' => (is => 'rw', isa => 'DBIx::Class::Schema');
-
has 'schema' => (is => 'rw', isa => 'DBIx::Class::Schema');
has 'schema_class' => (
@@ -517,6 +515,20 @@
}
}
+{
+ my %COMPOSED_CACHE;
+
+ sub composed_schema {
+ my $self = shift;
+ my $class = $self->_original_class_name;
+ my $store = \$COMPOSED_CACHE{$class}{$self->schema_class};
+
+ $$store = shift if @_;
+
+ return $$store
+ }
+}
+
__PACKAGE__->meta->make_immutable;
=head1 SEE ALSO
More information about the Catalyst-commits
mailing list