Mercurial > pub > Impl
comparison Lib/IMPL/Web/CGIApplication.pm @ 285:546957c50a36
*IMPL::Web::Handler::TTView Reworked template selection mechanism
*IMPL::Web::Application: refactoring
-Removed obsolete IMPL::Text modules
| author | cin |
|---|---|
| date | Mon, 18 Feb 2013 02:55:59 +0400 |
| parents | a02b110da931 |
| children | 63709a4e6da0 |
comparison
equal
deleted
inserted
replaced
| 284:f2a6bc5f3184 | 285:546957c50a36 |
|---|---|
| 1 package IMPL::Web::CGIApplication; | 1 package IMPL::Web::CGIApplication; |
| 2 use strict; | 2 use strict; |
| 3 | 3 |
| 4 use IMPL::Const qw(:prop); | |
| 5 use IMPL::declare { | 4 use IMPL::declare { |
| 6 require => { | 5 require => { |
| 7 CGIWrapper => 'IMPL::Web::CGIWrapper' | 6 CGIWrapper => 'IMPL::Web::CGIWrapper' |
| 8 }, | 7 }, |
| 9 base => [ | 8 base => [ |
| 10 'IMPL::Web::Application' => '@_' | 9 'IMPL::Web::Application' => '@_' |
| 11 ], | |
| 12 props => [ | |
| 13 _queryFetched => PROP_RW | |
| 14 ] | 10 ] |
| 15 }; | 11 }; |
| 16 | 12 |
| 17 sub CTOR { | 13 sub CTOR { |
| 18 my ($this) = @_; | 14 my ($this) = @_; |
| 19 | 15 |
| 20 $this->output(\*STDOUT) unless $this->output; | 16 $this->output(\*STDOUT) unless $this->output; |
| 21 } | 17 } |
| 22 | 18 |
| 23 sub FetchRequest { | 19 sub Run { |
| 24 my ($this) = @_; | 20 my ($this) = @_; |
| 25 | |
| 26 return if $this->_queryFetched; | |
| 27 | 21 |
| 28 my $query = CGIWrapper->new(); | 22 my $query = CGIWrapper->new(); |
| 29 | 23 |
| 30 $query->charset($this->requestCharset) if $this->requestCharset; | 24 $query->charset($this->requestCharset) if $this->requestCharset; |
| 31 | 25 |
| 32 $this->_queryFetched(1); | 26 $this->ProcessRequest($query); |
| 33 | |
| 34 return $query; | |
| 35 } | 27 } |
| 36 | 28 |
| 37 1; | 29 1; |
