annotate Lib/IMPL/Web/ViewResult.pm @ 358:248f95c1762a

added simple XML Sax parser
author sergey
date Mon, 18 Nov 2013 01:25:35 +0400
parents 6b6d4b2275a1
children
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);
260
sergey
parents: 256
diff changeset
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
a02b110da931 refactoring
sergey
parents: 241
diff changeset
13 model => PROP_RW,
260
sergey
parents: 256
diff changeset
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
sergey
parents: 256
diff changeset
21 sub location {
sergey
parents: 256
diff changeset
22 carp "location property is absolute";
sergey
parents: 256
diff changeset
23 return shift->_location(@_);
sergey
parents: 256
diff changeset
24 }
sergey
parents: 256
diff changeset
25
244
a02b110da931 refactoring
sergey
parents: 241
diff changeset
26 1;
a02b110da931 refactoring
sergey
parents: 241
diff changeset
27
a02b110da931 refactoring
sergey
parents: 241
diff changeset
28 __END__
a02b110da931 refactoring
sergey
parents: 241
diff changeset
29
a02b110da931 refactoring
sergey
parents: 241
diff changeset
30 =pod
a02b110da931 refactoring
sergey
parents: 241
diff changeset
31
a02b110da931 refactoring
sergey
parents: 241
diff changeset
32 =head1 NAME
a02b110da931 refactoring
sergey
parents: 241
diff changeset
33
a02b110da931 refactoring
sergey
parents: 241
diff changeset
34 C<IMPL::Web::ViewResult> - описание представления результата.
a02b110da931 refactoring
sergey
parents: 241
diff changeset
35
a02b110da931 refactoring
sergey
parents: 241
diff changeset
36 =head1 SYNOPSIS
a02b110da931 refactoring
sergey
parents: 241
diff changeset
37
a02b110da931 refactoring
sergey
parents: 241
diff changeset
38 =begin code
a02b110da931 refactoring
sergey
parents: 241
diff changeset
39
a02b110da931 refactoring
sergey
parents: 241
diff changeset
40 sub HttpGet {
a02b110da931 refactoring
sergey
parents: 241
diff changeset
41 my ($this, $action) = @_;
a02b110da931 refactoring
sergey
parents: 241
diff changeset
42
a02b110da931 refactoring
sergey
parents: 241
diff changeset
43 return IMPL::Web::ViewResult->new(
260
sergey
parents: 256
diff changeset
44 model => $model
244
a02b110da931 refactoring
sergey
parents: 241
diff changeset
45 );
a02b110da931 refactoring
sergey
parents: 241
diff changeset
46 }
a02b110da931 refactoring
sergey
parents: 241
diff changeset
47
a02b110da931 refactoring
sergey
parents: 241
diff changeset
48 =end code
a02b110da931 refactoring
sergey
parents: 241
diff changeset
49
a02b110da931 refactoring
sergey
parents: 241
diff changeset
50 =head1 DESCRIPTION
a02b110da931 refactoring
sergey
parents: 241
diff changeset
51
265
6b6d4b2275a1 improved documentation
cin
parents: 260
diff changeset
52 Сожержит в себе информацию для представления модели. Также включает поля для
6b6d4b2275a1 improved documentation
cin
parents: 260
diff changeset
53 заголовков ответа C<cookies>, C<headers>, C<status>.
244
a02b110da931 refactoring
sergey
parents: 241
diff changeset
54
a02b110da931 refactoring
sergey
parents: 241
diff changeset
55 =head1 MEMBERS
a02b110da931 refactoring
sergey
parents: 241
diff changeset
56
a02b110da931 refactoring
sergey
parents: 241
diff changeset
57 =head2 C<[get,set]model>
a02b110da931 refactoring
sergey
parents: 241
diff changeset
58
a02b110da931 refactoring
sergey
parents: 241
diff changeset
59 Модель ресурса, как правило это результат выполнения C<Http> метода.
a02b110da931 refactoring
sergey
parents: 241
diff changeset
60
256
32aceba4ee6d corrected ViewHandlers to handle cookies and headers.
sergey
parents: 244
diff changeset
61 =head2 C<[get,set]cookies>
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 Хеш с печеньками, которые будут добавлены в C<HTTP> ответ.
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 =head2 C<[get,set]headers>
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 Заголовки которые нужно добавить в заголовки C<HTTP> ответа.
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 =head2 C<[get,set]status>
32aceba4ee6d corrected ViewHandlers to handle cookies and headers.
sergey
parents: 244
diff changeset
70
32aceba4ee6d corrected ViewHandlers to handle cookies and headers.
sergey
parents: 244
diff changeset
71 Код C<HTTP> ответа.
244
a02b110da931 refactoring
sergey
parents: 241
diff changeset
72
a02b110da931 refactoring
sergey
parents: 241
diff changeset
73 =cut