X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FDBIC%2FAPI%2FRequest%2FContext.pm;h=2bc0771b6b351e62125081baf6a8fb0fb375b56f;hb=HEAD;hp=5653031dcf363f26bc93f09c0ec56b3b46e84824;hpb=d273984026646e5b57c052deef3fcb9121122060;p=catagits%2FCatalyst-Controller-DBIC-API.git diff --git a/lib/Catalyst/Controller/DBIC/API/Request/Context.pm b/lib/Catalyst/Controller/DBIC/API/Request/Context.pm index 5653031..2bc0771 100644 --- a/lib/Catalyst/Controller/DBIC/API/Request/Context.pm +++ b/lib/Catalyst/Controller/DBIC/API/Request/Context.pm @@ -7,44 +7,44 @@ use MooseX::Types::Structured('Tuple'); use Catalyst::Controller::DBIC::API::Types(':all'); use namespace::autoclean; -=attribute_public objects is: ro, isa ArrayRef[Tuple[Object,Maybe[HashRef]]], traits: ['Array'] +=attribute_public objects -This attribute stores the objects found/created at the object action. It handles the following methods: +This attribute stores the objects found/created at the object action. +It handles the following methods: - all_objects => 'elements' - add_object => 'push' + all_objects => 'elements' + add_object => 'push' count_objects => 'count' - has_objects => 'count' + has_objects => 'count' clear_objects => 'clear' =cut -has objects => -( - is => 'ro', - isa => ArrayRef[ Tuple[ Object, Maybe[HashRef] ] ], - traits => [ 'Array' ], +has objects => ( + is => 'ro', + isa => ArrayRef[Tuple[Object,Maybe[HashRef]]], + traits => ['Array'], default => sub { [] }, - handles => - { - all_objects => 'elements', - add_object => 'push', + handles => { + all_objects => 'elements', + add_object => 'push', count_objects => 'count', - has_objects => 'count', + has_objects => 'count', clear_objects => 'clear', + get_object => 'get', }, ); -=attribute_public current_result_set is: ro, isa: L +=attribute_public current_result_set -Stores the current ResultSet derived from the initial L. +Stores the current ResultSet derived from the initial +L. =cut -has current_result_set => -( - is => 'ro', - isa => ResultSet, +has current_result_set => ( + is => 'ro', + isa => ResultSet, writer => '_set_current_result_set', );