Mercurial > pub > Impl
annotate Lib/IMPL/Web/ViewResult.pm @ 263:0f59b2de72af
*fixed IMPL::DOM::Schema circular module references
*modified IMPL::Object::Singleton, added auto-activation
*code cleanups, docs
author | sergey |
---|---|
date | Wed, 09 Jan 2013 05:17:44 +0400 |
parents | 2879cdb6b8cd |
children | 6b6d4b2275a1 |
rev | line source |
---|---|
241
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
1 package IMPL::Web::ViewResult; |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
2 use strict; |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
3 |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
4 use IMPL::Const qw(:prop); |
260 | 5 use Carp qw(carp); |
241
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
6 |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
7 use IMPL::declare { |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
8 base => [ |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
9 'IMPL::Object' => undef, |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
10 'IMPL::Object::Autofill' => '@_' |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
11 ], |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
12 props => [ |
244 | 13 model => PROP_RW, |
260 | 14 _location => PROP_RW, |
256
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
15 cookies => PROP_RW, |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
16 headers => PROP_RW, |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
17 status => PROP_RW |
241
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
18 ] |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
19 }; |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
20 |
260 | 21 sub location { |
22 carp "location property is absolute"; | |
23 return shift->_location(@_); | |
24 } | |
25 | |
244 | 26 1; |
27 | |
28 __END__ | |
29 | |
30 =pod | |
31 | |
32 =head1 NAME | |
33 | |
34 C<IMPL::Web::ViewResult> - описание представления результата. | |
35 | |
36 =head1 SYNOPSIS | |
37 | |
38 =begin code | |
39 | |
40 sub HttpGet { | |
41 my ($this, $action) = @_; | |
42 | |
43 return IMPL::Web::ViewResult->new( | |
260 | 44 model => $model |
244 | 45 ); |
46 } | |
47 | |
48 =end code | |
49 | |
50 =head1 DESCRIPTION | |
51 | |
52 Сожержит в себе информацию для представления модели. | |
53 | |
54 =head1 MEMBERS | |
55 | |
56 =head2 C<[get,set]model> | |
57 | |
58 Модель ресурса, как правило это результат выполнения C<Http> метода. | |
59 | |
256
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
60 =head2 C<[get,set]cookies> |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
61 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
62 Хеш с печеньками, которые будут добавлены в C<HTTP> ответ. |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
63 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
64 =head2 C<[get,set]headers> |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
65 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
66 Заголовки которые нужно добавить в заголовки C<HTTP> ответа. |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
67 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
68 =head2 C<[get,set]status> |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
69 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
70 Код C<HTTP> ответа. |
244 | 71 |
72 =cut |