# Global objects in Perspective Scope

**URL:** <https://forum.inductiveautomation.com/t/global-objects-in-perspective-scope/53688>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 2, 2021, 5:19pm UTC](https://forum.inductiveautomation.com/t/global-objects-in-perspective-scope/53688 "2021-12-02T17:19:01Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 25, 2022, 4:11pm UTC](https://forum.inductiveautomation.com/t/global-objects-in-perspective-scope/53688/27 "2022-05-25T16:11:37Z")

</div>

There is a scenario **(race condition)** where an import in one script module could capture old code when multiple scripts were updated.

If you need a module to appear under another name, use assignment, not import, just before you use it. In function scope, don't rely on such from outer scopes. Only a reference to the fully-qualified name will ensure you get the latest code.

{ I wouldn't be surprised if jython 2.7 improved this situation, but I don't think it is gone. }

Edit: New bold above. The race has been caught, and a work-around developed:

> [@Project Library Script Initialization Races](https://forum.inductiveautomation.com/t/project-library-script-initialization-races/98636):
>
> Are you annoyed by pseudo-random breakage in Ignition project library scripting? Odd top-level constants being garbled, or operations in the top level that have side effects running twice? Or more? Not happening much, but always around project edits, and sometimes even on gateway restart? Yeah, me too. frowning_face Poking around under the hood back in the spring, for a module development task, I ran across some problematic IA bytecode and pinged some people. But it went nowhere, as I co…

---

_[View the full topic](https://forum.inductiveautomation.com/t/global-objects-in-perspective-scope/53688)._
