Mercurial > pub > Impl
comparison Lib/IMPL/Web/QueryHandler/JsonFormat.pm @ 166:4267a2ac3d46
Added Class::Template,
Rewritten SQL::Schema
'use parent' directive instead of 'use base'
| author | wizard |
|---|---|
| date | Sat, 23 Apr 2011 23:12:06 +0400 |
| parents | fb896377389f |
| children | aaab45153411 |
comparison
equal
deleted
inserted
replaced
| 165:76515373dac0 | 166:4267a2ac3d46 |
|---|---|
| 1 use strict; | 1 use strict; |
| 2 package IMPL::Transform::Json; | 2 package IMPL::Transform::Json; |
| 3 | 3 |
| 4 package IMPL::Web::QueryHandler::JsonFormat; | 4 package IMPL::Web::QueryHandler::JsonFormat; |
| 5 use base qw(IMPL::Web::QueryHandler); | 5 use parent qw(IMPL::Web::QueryHandler); |
| 6 use Error qw(:try); | 6 use Error qw(:try); |
| 7 use JSON; | 7 use JSON; |
| 8 | 8 |
| 9 sub Process { | 9 sub Process { |
| 10 my ($this,$action,$nextHandler) = @_; | 10 my ($this,$action,$nextHandler) = @_; |
| 26 print $hout to_json( $t->Transform($result), {pretty => 1} ); | 26 print $hout to_json( $t->Transform($result), {pretty => 1} ); |
| 27 } | 27 } |
| 28 | 28 |
| 29 package IMPL::Transform::Json; | 29 package IMPL::Transform::Json; |
| 30 | 30 |
| 31 use base qw(IMPL::Transform); | 31 use parent qw(IMPL::Transform); |
| 32 use IMPL::Class::Property; | 32 use IMPL::Class::Property; |
| 33 use IMPL::Class::Property::Direct; | 33 use IMPL::Class::Property::Direct; |
| 34 use Scalar::Util qw(refaddr); | 34 use Scalar::Util qw(refaddr); |
| 35 | 35 |
| 36 BEGIN { | 36 BEGIN { |
