[Catalyst-commits] r10358 - in trunk/Catalyst-Model-DBIC-Schema: .
lib/Catalyst/Helper/Model/DBIC lib/Catalyst/Model/DBIC
lib/Catalyst/Model/DBIC/Schema/Trait
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Fri May 29 10:39:18 GMT 2009
Author: caelum
Date: 2009-05-29 10:39:18 +0000 (Fri, 29 May 2009)
New Revision: 10358
Modified:
trunk/Catalyst-Model-DBIC-Schema/Makefile.PL
trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Helper/Model/DBIC/Schema.pm
trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm
trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema/Trait/Caching.pm
trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema/Trait/Replicated.pm
Log:
cleanups, deps on mx::traits which is not released yet
Modified: trunk/Catalyst-Model-DBIC-Schema/Makefile.PL
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/Makefile.PL 2009-05-29 09:31:32 UTC (rev 10357)
+++ trunk/Catalyst-Model-DBIC-Schema/Makefile.PL 2009-05-29 10:39:18 UTC (rev 10358)
@@ -5,11 +5,11 @@
requires 'DBIx::Class' => '0.08103';
requires 'Catalyst::Runtime' => '5.80003';
-requires 'MooseX::Traits' => '0.05';
+requires 'MooseX::Traits' => '0.06';
requires 'Moose';
requires 'Moose::Autobox';
requires 'MooseX::Types';
-requires 'namespace::clean';
+requires 'namespace::autoclean';
requires 'Carp::Clan';
requires 'List::MoreUtils';
Modified: trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Helper/Model/DBIC/Schema.pm
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Helper/Model/DBIC/Schema.pm 2009-05-29 09:31:32 UTC (rev 10357)
+++ trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Helper/Model/DBIC/Schema.pm 2009-05-29 10:39:18 UTC (rev 10358)
@@ -1,5 +1,6 @@
package Catalyst::Helper::Model::DBIC::Schema;
+use namespace::autoclean;
use Moose;
no warnings 'uninitialized';
@@ -15,8 +16,6 @@
use List::MoreUtils 'firstidx';
use Scalar::Util 'looks_like_number';
-use namespace::clean -except => 'meta';
-
=head1 NAME
Catalyst::Helper::Model::DBIC::Schema - Helper for DBIC Schema Models
Modified: trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema/Trait/Caching.pm
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema/Trait/Caching.pm 2009-05-29 09:31:32 UTC (rev 10357)
+++ trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema/Trait/Caching.pm 2009-05-29 10:39:18 UTC (rev 10358)
@@ -1,12 +1,11 @@
package Catalyst::Model::DBIC::Schema::Trait::Caching;
+use namespace::autoclean;
use Moose::Role;
use Carp::Clan '^Catalyst::Model::DBIC::Schema';
use Catalyst::Model::DBIC::Schema::Types 'CursorClass';
use MooseX::Types::Moose qw/Int Str/;
-use namespace::clean -except => 'meta';
-
=head1 NAME
Catalyst::Model::DBIC::Schema::Trait::Caching - Query caching support for
Modified: trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema/Trait/Replicated.pm
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema/Trait/Replicated.pm 2009-05-29 09:31:32 UTC (rev 10357)
+++ trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema/Trait/Replicated.pm 2009-05-29 10:39:18 UTC (rev 10358)
@@ -1,13 +1,12 @@
package Catalyst::Model::DBIC::Schema::Trait::Replicated;
+use namespace::autoclean;
use Moose::Role;
use Moose::Autobox;
use Carp::Clan '^Catalyst::Model::DBIC::Schema';
use Catalyst::Model::DBIC::Schema::Types 'ConnectInfos';
-use namespace::clean -except => 'meta';
-
=head1 NAME
Catalyst::Model::DBIC::Schema::Trait::Replicated - Replicated storage support for
@@ -79,13 +78,12 @@
}
};
-my $build = sub {
+sub BUILD {}
+after BUILD => sub {
my $self = shift;
$self->storage->connect_replicants(map [ $_ ], $self->replicants->flatten);
};
-after BUILD => $build;
-sub BUILD { goto $build }
=head1 SEE ALSO
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-29 09:31:32 UTC (rev 10357)
+++ trunk/Catalyst-Model-DBIC-Schema/lib/Catalyst/Model/DBIC/Schema.pm 2009-05-29 10:39:18 UTC (rev 10358)
@@ -7,6 +7,7 @@
our $VERSION = '0.24';
+use namespace::autoclean;
use Carp::Clan '^Catalyst::Model::DBIC::Schema';
use Data::Dumper;
use DBIx::Class ();
@@ -17,8 +18,6 @@
use MooseX::Types::Moose qw/ArrayRef Str ClassName Undef/;
-use namespace::clean -except => 'meta';
-
=head1 NAME
Catalyst::Model::DBIC::Schema - DBIx::Class::Schema Model Class
@@ -458,25 +457,18 @@
if (my $traits = delete $args->{traits}) {
my @traits = $class->_resolve_traits($traits->flatten);
- return $class->new_with_traits(
+ return $class->new_with_traits({
traits => \@traits,
_original_class_name => $class,
_traits => $traits,
_resolved_traits => \@traits,
%$args
- );
+ });
}
- return $class->new(%$args);
+ return $class->new($args);
}
-# we override Catalyst::Component::BUILDARGS, which merges configs, because we
-# merge configs ourselves in COMPONENT. We also don't pass $app to ->new, so
-# Moose::Object::BUILDARGS works perfectly.
-sub BUILDARGS {
- goto &Moose::Object::BUILDARGS;
-}
-
sub BUILD {
my $self = shift;
my $class = ref $self;
@@ -533,8 +525,9 @@
=head2 ACCEPT_CONTEXT
-Point of extension for doing things at C<< $c->model >> time, returns the model
-instance, see L<Catalyst::Manual::Intro> for more information.
+Point of extension for doing things at C<< $c->model >> time with context,
+returns the model instance, see L<Catalyst::Manual::Intro/ACCEPT_CONTEXT> for
+more information.
=cut
More information about the Catalyst-commits
mailing list