diff Lib/IMPL/Config/Link.pm @ 59:0f3e369553bd

Rewritten property implementation (probably become slower but more flexible) Configuration infrastructure in progress (in the aspect of the lazy activation) Initial concept for the code generator
author wizard
date Tue, 09 Mar 2010 02:50:45 +0300
parents a35b60b16a99
children
line wrap: on
line diff
--- a/Lib/IMPL/Config/Link.pm	Fri Mar 05 20:14:45 2010 +0300
+++ b/Lib/IMPL/Config/Link.pm	Tue Mar 09 02:50:45 2010 +0300
@@ -11,12 +11,17 @@
 	return ${$_[0]} = ${$_[0]}->instance() if UNIVERSAL::isa(${$_[0]},'IMPL::Config::Activator');
 }
 
+sub surrogate {
+	die new IMPL::Exception("You can't create a forward declarations of the link");
+}
+
 sub restore {
 	my ($self,$data,$surrogate) = @_;
-	
+
 	my %args = @$data;
 	
 	die new IMPL::Exception('A target is required for the link') unless exists $args{target};
-	
-	return $self->new($args{target});
+	my $val;
+	tie $val, $self, $args{target};
+	return $val;
 }
\ No newline at end of file