OTRS/otrs — pull request #165 by moritz (2013-11-26 08:36:38+00:00)
Title: Object manager (Proof of Concept, do not merge yet!)

This is a proof of concept implementation of an object manager that creates objects and manages dependencies for us. I discussed this with @mg before.

Ideas:

* The top-level script or mod_perl handler or whatever creates an instance of the Object Manager, stores it in `local $OTRS::OM`.
* Classes that use the object manager inherit from `Kernel::System::ObjectManagerAware`. Those classes do not store a reference to LogObject, EncodeObject etc, instead they obtain those objects on demand with `$OTRS::OM->Get('Log')`, `$OTRS::OM->Get('Encode')` etc.
* The object manager has a method `->ObjectHash` which returns a hash that can be passed to the constructor of "old style" objects that aren't aware of the ObjectManager yet

Status:

* fastcgi (tested through Apache 2) and cgi (tested through plackup app.psgi) work enough to show AgentDashboard and AgentTicketZoom
* In general, modules not adapted to the object manager work, top-level scripts not adapted to the object manager are broken.

I accidentally based this branch on rel-3_3 instead of master. In the end it should land in master, of course, but for the sake of providing a better review I've submitted this pull request against rel-3_3