GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  IOC::SERVICE::PROTOTYPE (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



  use IOC::Service::Prototype;



DESCRIPTION

This class essentially can be used just like IOC::Service, 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 |
   +-------------------------+



    A Note about Lifecycles

One important distinction to make about this lifecycle as opposed to the singleton lifecycle is that we do not make any references to the component within the service, so you have total control over the scope of your component. This means that once the prototypical component you retrieved from a IOC::Service::Prototype container goes out of scope, it’s DESTROY method will be called (assuming all it’s own references have been cleaned up).

METHODS

<B>instanceB> This is the only method this subclass overrides. It changes this behavior to return a new instance of the component each time, as opposed to the normal Singleton instance.

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 <B>Devel::CoverB> to test the code coverage of my tests, see the CODE COVERAGE section of IOC for more information.

SEE ALSO

Prototype-style components are supported by the Spring Framework. <http://www.springframework.com>

AUTHOR

stevan little, <stevan@iinteractive.com>

COPYRIGHT AND LICENSE

Copyright 2004-2007 by Infinity Interactive, Inc.

<http://www.iinteractive.com>

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 IOC::SERVICE::PROTOTYPE (3) 2007-04-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.