comparison Lib/IMPL/Web/Application.pm @ 63:76b878ad6596

Added serialization support for the IMPL::Object::List More intelligent Exception message Fixed encoding support in the actions Improoved tests Minor fixes
author wizard
date Mon, 15 Mar 2010 02:38:09 +0300
parents c64bd1bf727d
children 2840c4c85db8
comparison
equal deleted inserted replaced
62:c64bd1bf727d 63:76b878ad6596
14 14
15 BEGIN { 15 BEGIN {
16 public property handlerError => prop_all; 16 public property handlerError => prop_all;
17 public property factoryAction => prop_all; 17 public property factoryAction => prop_all;
18 public property handlersQuery => prop_all | prop_list; 18 public property handlersQuery => prop_all | prop_list;
19 public property configuration => prop_all; 19 public property options => prop_all;
20 } 20 }
21 21
22 # custom factory 22 # custom factory
23 sub new { 23 sub new {
24 my ($self,$file) = @_; 24 my ($self,$file) = @_;
34 34
35 sub Run { 35 sub Run {
36 my ($this) = @_; 36 my ($this) = @_;
37 37
38 while (my $query = $this->FetchRequest()) { 38 while (my $query = $this->FetchRequest()) {
39 my $response = new IMPL::Web::Application::Response(query => $query);
40 39
40 # todo: move a creation of the response to the ActionClass
41 my $action = $this->factoryAction->new( 41 my $action = $this->factoryAction->new(
42 query => $query, 42 query => $query,
43 response => $response, 43 response => new IMPL::Web::Application::Response(query => $query),
44 application => $this, 44 application => $this,
45 ); 45 );
46 46
47 $action->ChainHandler($_) foreach $this->handlersQuery; 47 $action->ChainHandler($_) foreach $this->handlersQuery;
48 48
49 $action->Invoke(); 49 $action->Invoke();
50
51 $action->response->Complete;
50 } 52 }
51 } 53 }
52 54
53 { 55 {
54 my $hasFetched = 0; 56 my $hasFetched = 0;