Mercurial > pub > Impl
comparison Lib/IMPL/Web/CGIApplication.pm @ 244:a02b110da931
refactoring
fixed binding to CGI query parameters with multiple values
| author | sergey |
|---|---|
| date | Mon, 22 Oct 2012 04:09:27 +0400 |
| parents | |
| children | 546957c50a36 |
comparison
equal
deleted
inserted
replaced
| 243:cd2b1f121029 | 244:a02b110da931 |
|---|---|
| 1 package IMPL::Web::CGIApplication; | |
| 2 use strict; | |
| 3 | |
| 4 use IMPL::Const qw(:prop); | |
| 5 use IMPL::declare { | |
| 6 require => { | |
| 7 CGIWrapper => 'IMPL::Web::CGIWrapper' | |
| 8 }, | |
| 9 base => [ | |
| 10 'IMPL::Web::Application' => '@_' | |
| 11 ], | |
| 12 props => [ | |
| 13 _queryFetched => PROP_RW | |
| 14 ] | |
| 15 }; | |
| 16 | |
| 17 sub CTOR { | |
| 18 my ($this) = @_; | |
| 19 | |
| 20 $this->output(\*STDOUT) unless $this->output; | |
| 21 } | |
| 22 | |
| 23 sub FetchRequest { | |
| 24 my ($this) = @_; | |
| 25 | |
| 26 return if $this->_queryFetched; | |
| 27 | |
| 28 my $query = CGIWrapper->new(); | |
| 29 | |
| 30 $query->charset($this->requestCharset) if $this->requestCharset; | |
| 31 | |
| 32 $this->_queryFetched(1); | |
| 33 | |
| 34 return $query; | |
| 35 } | |
| 36 | |
| 37 1; |
