IOC::Service::Prototype::SetterInjection - An IOC Service object which returns a prototype instance


IOC documentation Contained in the IOC distribution.

Index


Code Index:

NAME

Top

IOC::Service::Prototype::SetterInjection - An IOC Service object which returns a prototype instance

SYNOPSIS

Top

  use IOC::Service::Prototype::SetterInjection;

DESCRIPTION

Top

This class essentially can be used just like IOC::Service::SetterInjection, the only difference is that it will return a new instance of the component each time rather than a singleton instance.

                        +--------------+
                        | IOC::Service |
                        +--------------+
                                |
                                ^
                                |
               +----------------+----------------+
               |                                 |
   +-------------------------+  +-------------------------------+
   | IOC::Service::Prototype |  | IOC::Service::SetterInjection |
   +-------------------------+  +-------------------------------+
               |                                 |   
               +----------------+----------------+
                                |
                                ^
                                |
            +------------------------------------------+ 
            | IOC::Service::Prototype::SetterInjection |
            +------------------------------------------+   

TO DO

Top

Work on the documentation

BUGS

Top

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

Top

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

SEE ALSO

Top

Prototype-style components are supported by the Spring Framework.

http://www.springframework.com

Non-Prototype-style Setter Injection in the PicoContainer is explained on this page

http://docs.codehaus.org/display/PICO/Setter+Injection

AUTHOR

Top

stevan little, <stevan@iinteractive.com>

COPYRIGHT AND LICENSE

Top


IOC documentation Contained in the IOC distribution.

package IOC::Service::Prototype::SetterInjection;

use strict;
use warnings;

our $VERSION = '0.01';

use IOC::Exceptions;

use base 'IOC::Service::SetterInjection', 'IOC::Service::Prototype';

# make sure we use the prototype version
*instance = \&IOC::Service::Prototype::instance;

1;

__END__