Mercurial > pub > Impl
comparison Lib/IMPL/Serialization.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 | 5edc2ac5231c |
children | 4267a2ac3d46 |
comparison
equal
deleted
inserted
replaced
139:5a9f64890c31 | 140:fb896377389f |
---|---|
366 } else { | 366 } else { |
367 $$refSurogate = $Data->[1]; | 367 $$refSurogate = $Data->[1]; |
368 return $refSurogate; | 368 return $refSurogate; |
369 } | 369 } |
370 } else { | 370 } else { |
371 eval "require $Type" unless _is_class($Type); | 371 eval "require $Type; 1;" or warn $@ unless _is_class($Type); |
372 if ( $Type->UNIVERSAL::can('restore') ) { | 372 if ( $Type->UNIVERSAL::can('restore') ) { |
373 return $Type->restore($Data,$refSurogate); | 373 return $Type->restore($Data,$refSurogate); |
374 } else { | 374 } else { |
375 die new Exception("Don't know how to deserialize $Type"); | 375 die new Exception("Don't know how to deserialize $Type"); |
376 } | 376 } |