Mercurial > pub > Impl
comparison Lib/IMPL/Web/Application/Response.pm @ 65:2840c4c85db8
Application configuration improvements
Documentation
| author | wizard |
|---|---|
| date | Tue, 16 Mar 2010 17:36:13 +0300 |
| parents | 76b878ad6596 |
| children | 9f5795a10939 |
comparison
equal
deleted
inserted
replaced
| 64:259cd3df6e53 | 65:2840c4c85db8 |
|---|---|
| 35 sub CTOR { | 35 sub CTOR { |
| 36 my ($this,%args) = @_; | 36 my ($this,%args) = @_; |
| 37 | 37 |
| 38 $this->query(CGI->new($this->query() | {})) unless $this->query; | 38 $this->query(CGI->new($this->query() | {})) unless $this->query; |
| 39 | 39 |
| 40 $this->streamOut(*STDOUT) unless $this->streamOut; | 40 if (lc $this->streamOut eq 'memory') { |
| 41 my $dummy = ''; | |
| 42 open my $hout, '>:encoding(utf8)', \$dummy or die new IMPL::Exception("Failed to create memory stream",$!); | |
| 43 $this->streamOut($hout); | |
| 44 } elsif (not $this->streamOut) { | |
| 45 $this->streamOut(*STDOUT); | |
| 46 } else { | |
| 47 die new IMPL::InvalidArgumentException("Invalid parameter value",$this->streamOut); | |
| 48 } | |
| 49 | |
| 41 $this->buffered(1) unless defined $this->buffered; | 50 $this->buffered(1) unless defined $this->buffered; |
| 42 binmode $this->streamOut, ":encoding(".$this->charset.")"; | 51 binmode $this->streamOut, ":encoding(".$this->charset.")"; |
| 43 } | 52 } |
| 44 | 53 |
| 45 sub _checkHeaderPrinted { | 54 sub _checkHeaderPrinted { |
