Mercurial > pub > Impl
comparison lib/IMPL/Config/ReferenceDescriptor.pm @ 421:7798345304bc ref20150831
working on IMPL::Config, removed old stuff
author | cin |
---|---|
date | Sun, 16 Jul 2017 22:59:39 +0300 |
parents | 3ed0c58e9da3 |
children | b0481c071bea |
comparison
equal
deleted
inserted
replaced
420:df591e3afd10 | 421:7798345304bc |
---|---|
36 | 36 |
37 $context->EnterScope( $this->_name, $this->services ); | 37 $context->EnterScope( $this->_name, $this->services ); |
38 | 38 |
39 my $ref = $this->reference; | 39 my $ref = $this->reference; |
40 my %opts; | 40 my %opts; |
41 my $inst; | |
41 $opts{default} = $this->default | 42 $opts{default} = $this->default |
42 if $this->optional; | 43 if $this->optional; |
43 | 44 |
44 if ( $this->lazy ) { | 45 if ( $this->lazy ) { |
45 my $clone = $context->Clone(); | 46 my $clone = $context->Clone(); |
46 return sub { | 47 $inst = sub { |
47 $clone->Resolve( $ref, %opts ); | 48 $clone->Resolve( $ref, %opts ); |
48 }; | 49 }; |
49 } | 50 } |
50 else { | 51 else { |
51 return $context->Resolve( $ref, %opts ); | 52 $inst = $context->Resolve( $ref, %opts ); |
52 } | 53 } |
53 | 54 |
54 $context->LeaveScope(); | 55 $context->LeaveScope(); |
56 return $inst; | |
55 } | 57 } |
56 | 58 |
57 1; | 59 1; |
58 | 60 |
59 __END__ | 61 __END__ |