annotate lib/IMPL/Web/Application/HttpResponseResource.pm @ 424:87af445663d7 ref20150831

IMPL::Object::_Base
author cin
date Tue, 03 Apr 2018 10:54:09 +0300
parents c6e90e02dd17
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
407
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
1 package IMPL::Web::Application::HttpResponseResource;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
2 use strict;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
3
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
4 use IMPL::Const qw(:prop);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
5 use IMPL::declare {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
6 require => {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
7 HttpResponse => 'IMPL::Web::HttpResponse'
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
8 },
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
9 base => [
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
10 'IMPL::Object' => undef,
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
11 'IMPL::Web::Application::ResourceInterface' => undef
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
12 ],
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
13 props => [
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
14 response => PROP_RW
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
15 ]
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
16 };
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
17
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
18 sub CTOR {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
19 my ($this,%args) = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
20
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
21 $this->response($args{response} || HttpResponse->NoContent);
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
22 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
23
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
24 sub FetchChildResource {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
25 return shift;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
26 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
27
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
28 sub InvokeHttpVerb {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
29 return shift->response;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
30 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
31
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
32 1;