Mercurial > pub > Impl
comparison lib/IMPL/Web/Application/HttpResponseResource.pm @ 407:c6e90e02dd17 ref20150831
renamed Lib->lib
| author | cin |
|---|---|
| date | Fri, 04 Sep 2015 19:40:23 +0300 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 406:f23fcb19d3c1 | 407:c6e90e02dd17 |
|---|---|
| 1 package IMPL::Web::Application::HttpResponseResource; | |
| 2 use strict; | |
| 3 | |
| 4 use IMPL::Const qw(:prop); | |
| 5 use IMPL::declare { | |
| 6 require => { | |
| 7 HttpResponse => 'IMPL::Web::HttpResponse' | |
| 8 }, | |
| 9 base => [ | |
| 10 'IMPL::Object' => undef, | |
| 11 'IMPL::Web::Application::ResourceInterface' => undef | |
| 12 ], | |
| 13 props => [ | |
| 14 response => PROP_RW | |
| 15 ] | |
| 16 }; | |
| 17 | |
| 18 sub CTOR { | |
| 19 my ($this,%args) = @_; | |
| 20 | |
| 21 $this->response($args{response} || HttpResponse->NoContent); | |
| 22 } | |
| 23 | |
| 24 sub FetchChildResource { | |
| 25 return shift; | |
| 26 } | |
| 27 | |
| 28 sub InvokeHttpVerb { | |
| 29 return shift->response; | |
| 30 } | |
| 31 | |
| 32 1; |
