Mercurial > pub > Impl
annotate Lib/IMPL/Web/QueryHandler/PageFormat.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 | 259cd3df6e53 |
rev | line source |
---|---|
62 | 1 package IMPL::Web::QueryHandler::PageFormat; |
2 use base qw(IMPL::Web::QueryHandler); | |
3 | |
4 __PACKAGE__->PassThroughArgs; | |
5 | |
6 use IMPL::Class::Property; | |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
7 use IMPL::Web::TDocument; |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
8 use Error qw(:try); |
62 | 9 |
10 sub Process { | |
11 my ($this,$action,$nextHandler) = @_; | |
12 | |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
13 my $doc = new IMPL::Web::TDocument(); |
62 | 14 |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
15 try { |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
16 $doc->loadFile ( $ENV{PATH_TRANSLATED}, 'cp1251' ); |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
17 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
18 $action->response->contentType('text/html'); |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
19 my $hOut = $action->response->streamBody; |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
20 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
21 print $hOut $doc->Render(); |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
22 } finally { |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
23 $doc->Dispose; |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
24 }; |
62 | 25 } |
26 | |
27 1; |