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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
a02b110da931 refactoring
sergey
parents: 241
diff changeset
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
a02b110da931 refactoring
sergey
parents: 241
diff changeset
20 1;
a02b110da931 refactoring
sergey
parents: 241
diff changeset
21
a02b110da931 refactoring
sergey
parents: 241
diff changeset
22 __END__
a02b110da931 refactoring
sergey
parents: 241
diff changeset
23
a02b110da931 refactoring
sergey
parents: 241
diff changeset
24 =pod
a02b110da931 refactoring
sergey
parents: 241
diff changeset
25
a02b110da931 refactoring
sergey
parents: 241
diff changeset
26 =head1 NAME
a02b110da931 refactoring
sergey
parents: 241
diff changeset
27
a02b110da931 refactoring
sergey
parents: 241
diff changeset
28 C<IMPL::Web::ViewResult> - описание представления результата.
a02b110da931 refactoring
sergey
parents: 241
diff changeset
29
a02b110da931 refactoring
sergey
parents: 241
diff changeset
30 =head1 SYNOPSIS
a02b110da931 refactoring
sergey
parents: 241
diff changeset
31
a02b110da931 refactoring
sergey
parents: 241
diff changeset
32 =begin code
a02b110da931 refactoring
sergey
parents: 241
diff changeset
33
a02b110da931 refactoring
sergey
parents: 241
diff changeset
34 sub HttpGet {
a02b110da931 refactoring
sergey
parents: 241
diff changeset
35 my ($this, $action) = @_;
a02b110da931 refactoring
sergey
parents: 241
diff changeset
36
a02b110da931 refactoring
sergey
parents: 241
diff changeset
37 return IMPL::Web::ViewResult->new(
a02b110da931 refactoring
sergey
parents: 241
diff changeset
38 model => $model,
a02b110da931 refactoring
sergey
parents: 241
diff changeset
39 location => $this->location
a02b110da931 refactoring
sergey
parents: 241
diff changeset
40 );
a02b110da931 refactoring
sergey
parents: 241
diff changeset
41 }
a02b110da931 refactoring
sergey
parents: 241
diff changeset
42
a02b110da931 refactoring
sergey
parents: 241
diff changeset
43 =end code
a02b110da931 refactoring
sergey
parents: 241
diff changeset
44
a02b110da931 refactoring
sergey
parents: 241
diff changeset
45 =head1 DESCRIPTION
a02b110da931 refactoring
sergey
parents: 241
diff changeset
46
a02b110da931 refactoring
sergey
parents: 241
diff changeset
47 Сожержит в себе информацию для представления модели.
a02b110da931 refactoring
sergey
parents: 241
diff changeset
48
a02b110da931 refactoring
sergey
parents: 241
diff changeset
49 =head1 MEMBERS
a02b110da931 refactoring
sergey
parents: 241
diff changeset
50
a02b110da931 refactoring
sergey
parents: 241
diff changeset
51 =head2 C<[get,set]model>
a02b110da931 refactoring
sergey
parents: 241
diff changeset
52
a02b110da931 refactoring
sergey
parents: 241
diff changeset
53 Модель ресурса, как правило это результат выполнения C<Http> метода.
a02b110da931 refactoring
sergey
parents: 241
diff changeset
54
a02b110da931 refactoring
sergey
parents: 241
diff changeset
55 =head2 C<[get,set]location>
a02b110da931 refactoring
sergey
parents: 241
diff changeset
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
a02b110da931 refactoring
sergey
parents: 241
diff changeset
70
a02b110da931 refactoring
sergey
parents: 241
diff changeset
71 =cut