comparison Lib/IMPL/Serialization.pm @ 199:e743a8481327

Added REST support for forms (with only get and post methods)
author sergey
date Mon, 23 Apr 2012 01:36:52 +0400
parents 2ffe6f661605
children 5146e17a7b76
comparison
equal deleted inserted replaced
198:2ffe6f661605 199:e743a8481327
277 277
278 return 1; 278 return 1;
279 } 279 }
280 } 280 }
281 281
282 sub _is_class {
283 no strict 'refs';
284 scalar keys %{"$_[0]::"} ? 1 : 0;
285 }
286
287 { 282 {
288 my %classes; 283 my %classes;
289 sub _load_class { 284 sub _load_class {
290 my $class = shift; 285 return if $classes{$_[0]};
291 $classes{$class} = 1; 286
292 eval "require $class"; 287 die new IMPL::Exception("Invalid class name",$_[0]) unless $_[0] =~ m/^\w+(\:\:\w+)*$/;
288
289 eval "require $_[0]";
290 $classes{$_[0]} = 1;
293 } 291 }
294 } 292 }
295 293
296 sub DefaultSurrogateHelper { 294 sub DefaultSurrogateHelper {
297 my ($Type) = @_; 295 my ($Type) = @_;