comparison Lib/IMPL/Web/View/ObjectFactory.pm @ 245:7c517134c42f

Added Unsupported media type Web exception corrected resourceLocation setting in the resource Implemented localizable resources for text messages fixed TT view scopings, INIT block in controls now sets globals correctly.
author sergey
date Mon, 29 Oct 2012 03:15:22 +0400
parents abc7c26bf615
children
comparison
equal deleted inserted replaced
244:a02b110da931 245:7c517134c42f
11 base =>[ 11 base =>[
12 'IMPL::Object::Factory' => '@_' 12 'IMPL::Object::Factory' => '@_'
13 ] 13 ]
14 }; 14 };
15 15
16 use IMPL::Resources::Strings {
17 MsgNoMethod => 'Method "%method%" isn\'t found in "%target%"'
18 };
19
16 sub AUTOLOAD { 20 sub AUTOLOAD {
17 my $this = shift; 21 my $this = shift;
18 my ($method) = ($AUTOLOAD =~ m/(\w+)$/); 22 my ($method) = ($AUTOLOAD =~ m/(\w+)$/);
19 23
20 return if $method eq 'DESTROY'; 24 return if $method eq 'DESTROY';
21 my $target = $this->factory; 25 my $target = $this->factory;
22 if ( $target->can($method) ) { 26 if ( $target->can($method) ) {
23 return $target->$method(@_); 27 return $target->$method(@_);
24 } else { 28 } else {
25 die OpException->new("Method '$method' isn't found in '$target'") 29 die OpException->new( MsgNoMethod( method => $method, target => $target ) );
26 } 30 }
27 } 31 }
28 32
29 1; 33 1;