X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FTraitFor%2FModel%2FDBIC%2FSchema%2FSharedDatabaseConnection.pm;fp=lib%2FCatalyst%2FTraitFor%2FModel%2FDBIC%2FSchema%2FSharedDatabaseConnection.pm;h=2193ff9e13ca7f465e285e8708254c3c36e7b702;hb=03b63829f68c69b64b4c1ceb598c5e8865050b1f;hp=7918d156ca4f223dcbb159c9e98dc20438e07fcd;hpb=62d1bcd46a13dc6a1cad0dd58fd8e54a214acefb;p=catagits%2FCatalyst-TraitFor-Model-DBIC-Schema-SharedDatabaseConnection.git diff --git a/lib/Catalyst/TraitFor/Model/DBIC/Schema/SharedDatabaseConnection.pm b/lib/Catalyst/TraitFor/Model/DBIC/Schema/SharedDatabaseConnection.pm index 7918d15..2193ff9 100644 --- a/lib/Catalyst/TraitFor/Model/DBIC/Schema/SharedDatabaseConnection.pm +++ b/lib/Catalyst/TraitFor/Model/DBIC/Schema/SharedDatabaseConnection.pm @@ -2,7 +2,7 @@ use strict; use warnings; package Catalyst::TraitFor::Model::DBIC::Schema::SharedDatabaseConnection; - +$Catalyst::TraitFor::Model::DBIC::Schema::SharedDatabaseConnection::VERSION = '0.01'; use Moose::Role; has parent_model => ( @@ -11,16 +11,16 @@ has parent_model => ( required => 1, ); -has cloned => ( +has _cloned_parent_model => ( is => 'rw', default => 0, ); around ACCEPT_CONTEXT => sub { my ( $orig, $self, $app, @rest ) = ( shift, shift, @_ ); - unless ( $self->cloned ) { + unless ( $self->_cloned_parent_model ) { $self->schema->storage( $app->model( $self->parent_model )->schema->storage ); - $self->cloned(1); + $self->_cloned_parent_model(1); } $self->$orig( $app, @rest ); };