From: Tomas Doran Date: Tue, 30 Aug 2011 11:27:28 +0000 (+0100) Subject: And lets try once more, with half a brain-cell turned on X-Git-Tag: v0.56~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Model-DBIC-Schema.git;a=commitdiff_plain;h=2a9509a44ddfa114f6f6df8e2a6be06f49f5d1ff And lets try once more, with half a brain-cell turned on --- diff --git a/lib/Catalyst/TraitFor/Model/DBIC/Schema/PerRequestSchema.pm b/lib/Catalyst/TraitFor/Model/DBIC/Schema/PerRequestSchema.pm index dcbd61f..df254b3 100644 --- a/lib/Catalyst/TraitFor/Model/DBIC/Schema/PerRequestSchema.pm +++ b/lib/Catalyst/TraitFor/Model/DBIC/Schema/PerRequestSchema.pm @@ -1,13 +1,8 @@ package Catalyst::TraitFor::Model::DBIC::Schema::PerRequestSchema; -use Moose; +use Moose::Role; use namespace::autoclean; -sub BUILD {} -after BUILD => sub { - my ($self) = @_; - confess("You have not implemented a per_request_schema_attributes method in " . ref($self)) - unless $self->can('per_request_schema_attributes'); -}; +requires 'per_request_schema_attributes'; with 'Catalyst::Component::InstancePerContext';