# HG changeset patch # User cin # Date 1370967772 -14400 # Node ID cd6409f66a5fa63196eabb31667769d9bbc4d5df # Parent 04a093f0a5a6810452ca402991c798f8644eb080 small fixes, request environment is deprecated diff -r 04a093f0a5a6 -r cd6409f66a5f Lib/IMPL/Web/Application/Resource.pm --- a/Lib/IMPL/Web/Application/Resource.pm Sun Jun 09 21:48:57 2013 +0400 +++ b/Lib/IMPL/Web/Application/Resource.pm Tue Jun 11 20:22:52 2013 +0400 @@ -2,6 +2,7 @@ use strict; use URI; +use Carp qw(carp); use IMPL::Const qw(:prop); use IMPL::declare { require => { @@ -35,13 +36,13 @@ die ArgumentException->new( contract => 'A contract is required' ) unless $args{contract}; - $this->request($args{action}) + $this->request($args{request}) or die ArgumentException->new(request => 'A request object must be specified'); $this->parent( $args{parent} ); $this->model( $args{model} ); $this->id( $args{id} ); $this->contract( $args{contract} ); - $this->application( $args{action}{application} ); + $this->application( $args{request}->application ); # если расположение явно не указано, то оно вычисляется автоматически, # либо остается не заданным @@ -70,7 +71,10 @@ # т.к. они просто освободятся несколько позже. if ( not $request->context->{resource} ) { $request->context->{resource} = $this; - $request->context->{environment} = sub { $this->PrepareEnvironment() }; + $request->context->{environment} = sub { + carp "using request environment is deprecated"; + $this->PrepareEnvironment() + }; } return _InvokeDelegate( $operation, $this, $request );