diff 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
line wrap: on
line diff
--- a/Lib/IMPL/Serialization.pm	Fri Apr 20 16:06:36 2012 +0400
+++ b/Lib/IMPL/Serialization.pm	Mon Apr 23 01:36:52 2012 +0400
@@ -279,17 +279,15 @@
   }
 }
 
-sub _is_class {
-  no strict 'refs';
-  scalar keys %{"$_[0]::"} ? 1 : 0;
-}
-
 {
 	my %classes;
 	sub _load_class {
-		my $class = shift;
-		$classes{$class} = 1;
-		eval "require $class";
+		return if $classes{$_[0]};
+		
+		die new IMPL::Exception("Invalid class name",$_[0]) unless $_[0] =~ m/^\w+(\:\:\w+)*$/;
+		
+		eval "require $_[0]";
+		$classes{$_[0]} = 1;
 	}
 }