METHODS

Creates a service with a $name, and uses the $component_class and $component_constructor string arguments to initialize the service on demand.

If the $component_class and $component_constructor arguments are not defined, an IOC::InsufficientArguments exception will be thrown.

Upon request of the component managed by this service, an attempt will be made to load the $component_class. If that loading fails, an IOC::ClassLoadingError exception will be thrown with the details of the underlying error. If the $component_class loads successfully, then it will be inspected for an available $component_constructor method. If the $component_constructor method is not found, an IOC::ConstructorNotFound exception will be thrown. If the $component_constructor method is found, then it will be called with the values found in $paramaters. However, before $paramaters are passed, they are first looped through looking for any "ComponentParameters" (these are place holders created with the class method ComponentParameter (see below)), and replaces these items with the proper values extracted from the IOC framework.

CLASS METHODS

ComponentParameter ($component_name)

Given a $component_name this will create a place holder suitable for placement in the $parameters argument of the new method. The $component_name must be a valid service name available to the service either through get or find.

TO DO

Work on the documentation

BUGS

None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it.

CODE COVERAGE

I use Devel::Cover to test the code coverage of my tests, see the CODE COVERAGE section of IOC for more information.