Mercurial > pub > Impl
comparison Lib/IMPL/Web/Application/Action.pm @ 339:97628101b765
refactoring: application now holds a security object factory rather than a security object
author | cin |
---|---|
date | Wed, 19 Jun 2013 03:25:44 +0400 |
parents | b1e7b55b4a38 |
children | c090d9102a38 |
comparison
equal
deleted
inserted
replaced
338:c78dfbe658bd | 339:97628101b765 |
---|---|
1 package IMPL::Web::Application::Action; | 1 package IMPL::Web::Application::Action; |
2 use strict; | 2 use strict; |
3 | 3 |
4 use Carp qw(carp); | 4 use Carp qw(carp); |
5 | 5 use URI; |
6 use JSON; | |
7 | |
8 use IMPL::lang; | |
6 use IMPL::Const qw(:prop); | 9 use IMPL::Const qw(:prop); |
7 use IMPL::Web::CGIWrapper(); | 10 use IMPL::Web::CGIWrapper(); |
8 use URI; | |
9 use JSON; | |
10 | |
11 use IMPL::declare { | 11 use IMPL::declare { |
12 require => { | |
13 Disposable => '-IMPL::Object::Disposable' | |
14 }, | |
12 base => [ | 15 base => [ |
13 'IMPL::Object' => undef, | 16 'IMPL::Object' => undef, |
14 'IMPL::Object::Autofill' => '@_' | 17 'IMPL::Object::Autofill' => '@_', |
18 'IMPL::Object::Disposable' => undef | |
15 ], | 19 ], |
16 props => [ | 20 props => [ |
17 application => PROP_RW, | 21 application => PROP_RW, |
18 query => PROP_RO, | 22 query => PROP_RO, |
19 context => PROP_RW, | 23 context => PROP_RW, |
164 } else { | 168 } else { |
165 return; | 169 return; |
166 } | 170 } |
167 } | 171 } |
168 | 172 |
173 sub Dispose { | |
174 my ($this) = @_; | |
175 | |
176 $_->Dispose() foreach grep is($_,Disposable), values %{$this->context}; | |
177 | |
178 $this->next::method(); | |
179 } | |
180 | |
169 1; | 181 1; |
170 | 182 |
171 __END__ | 183 __END__ |
172 | 184 |
173 =pod | 185 =pod |