About Object Manager dependencies

English! place to talk about development, programming and coding
Post Reply
voiprodrigo
Znuny newbie
Posts: 62
Joined: 03 Dec 2014, 18:49
Znuny Version: OTRS 4
Location: Portugal
Contact:

About Object Manager dependencies

Post by voiprodrigo »

Hello,

Can someone help me understand when do I really need to declare object dependencies?

For example, I'm setting a custom Ticket Event module. The module gets objects via OM, like Log, DynamicField, DynamicField::Backend, Time, State, Ticket, e.g my $TimeObject = $Kernel::OM->Get('Kernel::System::Time');

I instance each object in the code just before the first time they are required.

Now, do I need to declare all of the packages as dependencies in @ObjectDependencies? Or it doesn't matter?

I know the documentation says this is required for ordered destruction of the objects, but I'd like to grasp this better, appreciate anyone's insight.

Thanks.
Linux (Ubuntu 14.04.1 LTS) | MySQL 5.5.40 | OTRS 4.0.7
Post Reply