jasonmay/perl6-ioc/lib/IoC/Service

perl6-ioc src

NAME

IoC::Service

SYNOPSIS

  my $service = IoC::Service.new(...);

 

DESCRIPTION

Used in the container class for each component. See L<IoC::Container> for an example of use of this class.

LIFECYCLES

Some (but not all) services allow you to supply a specific lifecycle of the service. Right now, there is either Singleton or no lifecycile at all, i.e. a new object is created upon retrieval.

DEPENDENCY INJECTION

Some services allow you to choose dependencies, which will inject values right into your object's attributes upon construction time. Currently the only syntax for supplying a dependency is a hashref where the key is the I<service> and the value is the I<attribute>. See L<IoC::Container> or the tests for examples.

METHODS

(item) C
Returns the actual object the service represents

BUGS

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or post an issue to http://github.com/jasonmay/perl6-ioc/

REFERENCE

(item) L

SEE ALSO

(item) IoC::ConstructorInjection
(item) IoC::BlockInjection
(item) IoC::Literal

AUTHOR

Jason May, <jason.a.may@gmail.com>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: