diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/Web/CGIApplication.pm	Mon Oct 22 04:09:27 2012 +0400
@@ -0,0 +1,37 @@
+package IMPL::Web::CGIApplication;
+use strict;
+
+use IMPL::Const qw(:prop);
+use IMPL::declare {
+    require => {
+        CGIWrapper => 'IMPL::Web::CGIWrapper'        
+    },
+    base => [
+        'IMPL::Web::Application' => '@_'
+    ],
+    props => [
+        _queryFetched => PROP_RW
+    ]
+};
+
+sub CTOR {
+    my ($this) = @_;
+    
+    $this->output(\*STDOUT) unless $this->output;
+}
+
+sub FetchRequest {
+    my ($this) = @_;
+    
+    return if $this->_queryFetched;
+    
+    my $query = CGIWrapper->new();
+    
+    $query->charset($this->requestCharset) if $this->requestCharset;
+    
+    $this->_queryFetched(1);
+    
+    return $query;
+}
+
+1;
\ No newline at end of file