comparison 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
comparison
equal deleted inserted replaced
58:a35b60b16a99 59:0f3e369553bd
9 9
10 sub FETCH { 10 sub FETCH {
11 return ${$_[0]} = ${$_[0]}->instance() if UNIVERSAL::isa(${$_[0]},'IMPL::Config::Activator'); 11 return ${$_[0]} = ${$_[0]}->instance() if UNIVERSAL::isa(${$_[0]},'IMPL::Config::Activator');
12 } 12 }
13 13
14 sub surrogate {
15 die new IMPL::Exception("You can't create a forward declarations of the link");
16 }
17
14 sub restore { 18 sub restore {
15 my ($self,$data,$surrogate) = @_; 19 my ($self,$data,$surrogate) = @_;
16 20
17 my %args = @$data; 21 my %args = @$data;
18 22
19 die new IMPL::Exception('A target is required for the link') unless exists $args{target}; 23 die new IMPL::Exception('A target is required for the link') unless exists $args{target};
20 24 my $val;
21 return $self->new($args{target}); 25 tie $val, $self, $args{target};
26 return $val;
22 } 27 }