Mercurial > pub > Impl
changeset 401:16ff604298c7
minor fixes
author | cin |
---|---|
date | Thu, 15 May 2014 18:24:28 +0400 |
parents | ef37ec102dab |
children | b79081b70a7a |
files | Lib/IMPL/Security/AbstractPrincipal.pm Lib/IMPL/Security/Principal.pm Lib/IMPL/Web/Handler/RestController.pm Lib/IMPL/Web/View/TTView.pm |
diffstat | 4 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/IMPL/Security/AbstractPrincipal.pm Wed May 14 17:27:32 2014 +0400 +++ b/Lib/IMPL/Security/AbstractPrincipal.pm Thu May 15 18:24:28 2014 +0400 @@ -10,5 +10,9 @@ description => PROP_RW ]); +sub isNobody { + +} + 1;
--- a/Lib/IMPL/Security/Principal.pm Wed May 14 17:27:32 2014 +0400 +++ b/Lib/IMPL/Security/Principal.pm Thu May 15 18:24:28 2014 +0400 @@ -13,7 +13,8 @@ 'IMPL::Security::AbstractPrincipal' => undef ], props => [ - @{AbstractPrincipal->abstractProps()} + @{AbstractPrincipal->abstractProps()}, + isNobody => PROP_RW ] }; @@ -22,7 +23,7 @@ my $nobody; sub nobody { - $nobody = $_[0]->new(name => 'nobody', description => '') unless $nobody; + $nobody = $_[0]->new(name => 'nobody', description => '', isNobody => 1) unless $nobody; return $nobody; }
--- a/Lib/IMPL/Web/Handler/RestController.pm Wed May 14 17:27:32 2014 +0400 +++ b/Lib/IMPL/Web/Handler/RestController.pm Thu May 15 18:24:28 2014 +0400 @@ -8,7 +8,8 @@ ResourceInterface => 'IMPL::Web::Application::ResourceInterface', Exception => 'IMPL::Exception', ArgumentExecption => '-IMPL::InvalidArgumentException', - NotFoundException => 'IMPL::Web::NotFoundException' + NotFoundException => 'IMPL::Web::NotFoundException', + Loader => 'IMPL::Code::Loader' }, base => { 'IMPL::Object' => undef, @@ -55,7 +56,12 @@ my @segments = $this->GetResourcePath($request); - my $res = $this->resourceFactory->new( + my $factory = $this->resourceFactory; + + $factory = Loader->default->Require($factory) + unless ref($factory) || eval { $factory->can('new') }; + + my $res = $factory->new( id => 'root', request => $request, location => Locator->new(base => $request->application->baseUrl),
--- a/Lib/IMPL/Web/View/TTView.pm Wed May 14 17:27:32 2014 +0400 +++ b/Lib/IMPL/Web/View/TTView.pm Thu May 15 18:24:28 2014 +0400 @@ -37,7 +37,7 @@ my $context = Context->new($this->options); eval { - warn $context->process('globals' . '.' . $this->tt_ext, $args); + $context->process('globals' . '.' . $this->tt_ext, $args); }; my $layout = delete $args->{layout} || $this->layout;