X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FDBIC%2FAPI%2FStoredResultSource.pm;h=dc8859b55178fa0dff4e5bc6959d18500c62e3e5;hp=3fc3cf4104be2ae9b63a9ecb892c49c6d3e5c844;hb=d72e59272b503e4e32c61975658fc356391f379f;hpb=d273984026646e5b57c052deef3fcb9121122060 diff --git a/lib/Catalyst/Controller/DBIC/API/StoredResultSource.pm b/lib/Catalyst/Controller/DBIC/API/StoredResultSource.pm index 3fc3cf4..dc8859b 100644 --- a/lib/Catalyst/Controller/DBIC/API/StoredResultSource.pm +++ b/lib/Catalyst/Controller/DBIC/API/StoredResultSource.pm @@ -1,5 +1,5 @@ package Catalyst::Controller::DBIC::API::StoredResultSource; -#ABSTRACT: Provides acessors for static resources +#ABSTRACT: Provides accessors for static resources use Moose::Role; use MooseX::Types::Moose(':all'); @@ -44,7 +44,7 @@ has 'stored_model' => ); sub _build_stored_model -{ +{ return $_[0]->_application->model($_[0]->class); } @@ -75,7 +75,7 @@ check_has_relation meticulously delves into the result sources relationships to sub check_has_relation { my ($self, $rel, $other, $nest, $static) = @_; - + $nest ||= $self->stored_result_source; if(HashRef->check($other)) @@ -99,14 +99,14 @@ sub check_has_relation =method_public check_column_relation -Convenience method to first check if the provided argument is a valid relation (if it is a HashRef) or column. +Convenience method to first check if the provided argument is a valid relation (if it is a HashRef) or column. =cut sub check_column_relation { my ($self, $col_rel, $static) = @_; - + if(HashRef->check($col_rel)) { try