Mercurial > pub > Impl
annotate Lib/IMPL/Web/ViewResult.pm @ 256:32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
Dirty hacks to handle binary data
RestController doesn't deal with file extensions anymore.
author | sergey |
---|---|
date | Wed, 12 Dec 2012 04:29:50 +0400 |
parents | a02b110da931 |
children | 2879cdb6b8cd |
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); |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
5 |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
6 use IMPL::declare { |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
7 base => [ |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
8 'IMPL::Object' => undef, |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
9 'IMPL::Object::Autofill' => '@_' |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
10 ], |
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
11 props => [ |
244 | 12 model => PROP_RW, |
256
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
13 location => PROP_RW, |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
14 cookies => PROP_RW, |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
15 headers => PROP_RW, |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
16 status => PROP_RW |
241
f48a1a9f4fa2
+Added ViewResult to allow implementation of the view environment.
sergey
parents:
diff
changeset
|
17 ] |
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 |
244 | 20 1; |
21 | |
22 __END__ | |
23 | |
24 =pod | |
25 | |
26 =head1 NAME | |
27 | |
28 C<IMPL::Web::ViewResult> - описание представления результата. | |
29 | |
30 =head1 SYNOPSIS | |
31 | |
32 =begin code | |
33 | |
34 sub HttpGet { | |
35 my ($this, $action) = @_; | |
36 | |
37 return IMPL::Web::ViewResult->new( | |
38 model => $model, | |
39 location => $this->location | |
40 ); | |
41 } | |
42 | |
43 =end code | |
44 | |
45 =head1 DESCRIPTION | |
46 | |
47 Сожержит в себе информацию для представления модели. | |
48 | |
49 =head1 MEMBERS | |
50 | |
51 =head2 C<[get,set]model> | |
52 | |
53 Модель ресурса, как правило это результат выполнения C<Http> метода. | |
54 | |
55 =head2 C<[get,set]location> | |
56 | |
256
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
57 Текущий абсолютный адрес ресурса. |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
58 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
59 =head2 C<[get,set]cookies> |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
60 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
61 Хеш с печеньками, которые будут добавлены в C<HTTP> ответ. |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
62 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
63 =head2 C<[get,set]headers> |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
64 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
65 Заголовки которые нужно добавить в заголовки C<HTTP> ответа. |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
66 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
67 =head2 C<[get,set]status> |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
68 |
32aceba4ee6d
corrected ViewHandlers to handle cookies and headers.
sergey
parents:
244
diff
changeset
|
69 Код C<HTTP> ответа. |
244 | 70 |
71 =cut |