Mercurial > pub > Impl
diff Lib/IMPL/Web/ViewResult.pm @ 260:2879cdb6b8cd
sync
author | sergey |
---|---|
date | Tue, 25 Dec 2012 02:18:59 +0400 |
parents | 32aceba4ee6d |
children | 6b6d4b2275a1 |
line wrap: on
line diff
--- a/Lib/IMPL/Web/ViewResult.pm Fri Dec 21 00:09:11 2012 +0400 +++ b/Lib/IMPL/Web/ViewResult.pm Tue Dec 25 02:18:59 2012 +0400 @@ -2,6 +2,7 @@ use strict; use IMPL::Const qw(:prop); +use Carp qw(carp); use IMPL::declare { base => [ @@ -10,13 +11,18 @@ ], props => [ model => PROP_RW, - location => PROP_RW, + _location => PROP_RW, cookies => PROP_RW, headers => PROP_RW, status => PROP_RW ] }; +sub location { + carp "location property is absolute"; + return shift->_location(@_); +} + 1; __END__ @@ -35,8 +41,7 @@ my ($this, $action) = @_; return IMPL::Web::ViewResult->new( - model => $model, - location => $this->location + model => $model ); } @@ -52,10 +57,6 @@ Модель ресурса, как правило это результат выполнения C<Http> метода. -=head2 C<[get,set]location> - -Текущий абсолютный адрес ресурса. - =head2 C<[get,set]cookies> Хеш с печеньками, которые будут добавлены в C<HTTP> ответ.