Mercurial > pub > Impl
diff lib/IMPL/Config/ReferenceDescriptor.pm @ 416:cc2cf8c0edc2 ref20150831
sync
author | cin |
---|---|
date | Thu, 29 Oct 2015 03:50:25 +0300 |
parents | 3d24b10dd0d5 |
children | 3ed0c58e9da3 |
line wrap: on
line diff
--- a/lib/IMPL/Config/ReferenceDescriptor.pm Tue Oct 20 07:32:55 2015 +0300 +++ b/lib/IMPL/Config/ReferenceDescriptor.pm Thu Oct 29 03:50:25 2015 +0300 @@ -23,6 +23,11 @@ $this->reference($ref) or die IMPL::InvalidArgumentException->new('ref'); + $this->lazy( $opts{lazy} ) if $opts{lazy}; + $this->optional( $opts{optional} ) if $opts{optional}; + $this->default( $opts{default} ) + if $opts{optional} and exists $opts{default}; + $this->_name( 'ref ' . $ref ); } @@ -50,3 +55,34 @@ } 1; + +__END__ + +=pod + +=head1 NAME + +C<IMPL::Config::ReferenceDescriptor> - A descriptor which is points to the other service + +=head1 MEMBERS + +=head2 PROPS + +=head3 reference + +=head3 lazy + +=head3 optional + +=head3 default + +=head2 METHODS + +=head3 CTOR($ref, %opts) + +=head3 Activate($context) + +Returns a result of the activation of the service specified by the C<reference> property. + +If the reference is lazy the method returns a closure.The C<$context> will be cloned and the clone will be used to create the closure. +=cut