Mercurial > pub > Impl
comparison Lib/IMPL/Web/QueryHandler/JsonFormat.pm @ 140:fb896377389f
to_json and escape_string functions for the templates
minor changes
| author | wizard | 
|---|---|
| date | Mon, 05 Jul 2010 02:22:42 +0400 | 
| parents | 44977efed303 | 
| children | 4267a2ac3d46 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 139:5a9f64890c31 | 140:fb896377389f | 
|---|---|
| 97 ); | 97 ); | 
| 98 | 98 | 
| 99 sub Transform { | 99 sub Transform { | 
| 100 my ($this,$object) = @_; | 100 my ($this,$object) = @_; | 
| 101 | 101 | 
| 102 # small hack to prevent cycling | |
| 103 | |
| 102 return $this->SUPER::Transform($object) unless ref $object; | 104 return $this->SUPER::Transform($object) unless ref $object; | 
| 103 | 105 | 
| 104 if (exists $this->{$_visited}{refaddr $object}) { | 106 if (exists $this->{$_visited}{refaddr $object}) { | 
| 105 return $this->{$_visited}{refaddr $object}; | 107 return $this->{$_visited}{refaddr $object}; | 
| 106 } else { | 108 } else { | 
