use warnings;
package Catalyst::TraitFor::Model::DBIC::Schema::SharedDatabaseConnection;
-
+$Catalyst::TraitFor::Model::DBIC::Schema::SharedDatabaseConnection::VERSION = '0.01';
use Moose::Role;
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 );
};