Mercurial > pub > Impl
comparison Lib/IMPL/Web/Application/Action.pm @ 391:2287c72f303a
code cleanup
author | cin |
---|---|
date | Thu, 13 Feb 2014 20:17:22 +0400 |
parents | ec58c47edb52 |
children |
comparison
equal
deleted
inserted
replaced
390:de1f875e8875 | 391:2287c72f303a |
---|---|
8 use IMPL::lang; | 8 use IMPL::lang; |
9 use IMPL::Const qw(:prop); | 9 use IMPL::Const qw(:prop); |
10 use IMPL::Web::CGIWrapper(); | 10 use IMPL::Web::CGIWrapper(); |
11 use IMPL::declare { | 11 use IMPL::declare { |
12 require => { | 12 require => { |
13 Disposable => '-IMPL::Object::Disposable' | 13 Disposable => '-IMPL::Object::Disposable', |
14 HttpResponse => 'IMPL::Web::HttpResponse' | |
14 }, | 15 }, |
15 base => [ | 16 base => [ |
16 'IMPL::Object' => undef, | 17 'IMPL::Object' => undef, |
17 'IMPL::Object::Autofill' => '@_', | 18 'IMPL::Object::Autofill' => '@_', |
18 'IMPL::Object::Disposable' => undef | 19 'IMPL::Object::Disposable' => undef |
152 my ($this,$path) = @_; | 153 my ($this,$path) = @_; |
153 | 154 |
154 return $path ? URI->new_abs($path,$this->applicationUrl) : $this->applicationUrl; | 155 return $path ? URI->new_abs($path,$this->applicationUrl) : $this->applicationUrl; |
155 } | 156 } |
156 | 157 |
158 sub Redirect { | |
159 my ($this,$path) = @_; | |
160 return HttpResponse->Redirect( | |
161 location => $this->CreateFullUrl($path) | |
162 ); | |
163 } | |
164 | |
157 sub _launder { | 165 sub _launder { |
158 my ($this,$value,$rx) = @_; | 166 my ($this,$value,$rx) = @_; |
159 | 167 |
160 if ( $value ) { | 168 if ( $value ) { |
161 if ($rx) { | 169 if ($rx) { |