Mercurial > pub > Impl
comparison Lib/IMPL/Web/Application/ResourceContract.pm @ 230:6d8092d8ce1b
*reworked IMPL::Security
*reworked IMPL::Web::Security
*refactoring
author | sergey |
---|---|
date | Mon, 08 Oct 2012 03:37:37 +0400 |
parents | 47f77e6409f7 |
children | abc7c26bf615 |
comparison
equal
deleted
inserted
replaced
229:47f77e6409f7 | 230:6d8092d8ce1b |
---|---|
1 package IMPL::Web::Application::ResourceContract; | 1 package IMPL::Web::Application::ResourceContract; |
2 use strict; | 2 use strict; |
3 use IMPL::lang qw(:constants); | 3 use IMPL::Const qw(:prop); |
4 use IMPL::declare { | 4 use IMPL::declare { |
5 require => { | 5 require => { |
6 'Exception' => 'IMPL::Exception', | 6 'Exception' => 'IMPL::Exception', |
7 'ArgumentException' => '-IMPL::ArgumentException', | 7 'ArgumentException' => '-IMPL::ArgumentException', |
8 'KeyNotFoundException' => '-IMPL::KeyNotFoundException', | 8 'KeyNotFoundException' => '-IMPL::KeyNotFoundException', |
37 $this->verbs( | 37 $this->verbs( |
38 { map { lc($_), $verbs->{$_} } keys %$verbs } ); | 38 { map { lc($_), $verbs->{$_} } keys %$verbs } ); |
39 | 39 |
40 my %nameMap; | 40 my %nameMap; |
41 | 41 |
42 foreach my $res (@$verbs) { | 42 foreach my $res (@$resources) { |
43 next unless $res->{contract}; | 43 next unless $res->{contract}; |
44 if ( my $name = $res->{name} ) { | 44 if ( my $name = $res->{name} ) { |
45 $nameMap{$name} = $res; | 45 $nameMap{$name} = $res; |
46 } | 46 } |
47 if ( $res->{match} ) { | 47 if ( $res->{match} ) { |
211 | 211 |
212 =begin code | 212 =begin code |
213 | 213 |
214 package My::Web::Application::ContractMapper; | 214 package My::Web::Application::ContractMapper; |
215 use strict; | 215 use strict; |
216 use IMPL::lang qw(:constants); | 216 use IMPL::Const qw(:prop); |
217 use IMPL::declare { | 217 use IMPL::declare { |
218 require => { | 218 require => { |
219 ForbiddenException => 'IMPL::Web::Forbidden' | 219 ForbiddenException => 'IMPL::Web::Forbidden' |
220 }, | 220 }, |
221 base => [ | 221 base => [ |