# Localmode

**URL:** <https://dev.lucee.org/t/localmode/6067>\
**Category:** support\
**Created:** [September 19, 2019, 2:16pm UTC](https://dev.lucee.org/t/localmode/6067 "2019-09-19T14:16:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmishyn](https://dev.lucee.org/user_avatar/dev.lucee.org/mmishyn/32/2227_2.png) [@mmishyn](https://dev.lucee.org/u/mmishyn)\
**Post date:** [September 19, 2019, 2:16pm UTC](https://dev.lucee.org/t/localmode/6067/1 "2019-09-19T14:16:13Z")

</div>

What does “localmode=true” means?

I see it in some function attributes definition like [Lucee/Application.cfc at master · lucee/Lucee · GitHub](https://github.com/lucee/Lucee/blob/master/core/src/main/cfml/context/doc/Application.cfc)

Example :

* * *

function getPackages() localmode=true {…}

* * *

According to documentation ( “[\<cffunction\> :: Lucee Documentation](https://docs.lucee.org/reference/tags/function.html)” ) it should be a string value with accepted values such as “classic” or “modern” only.

Please advise.

Thank you

---

<div class="post-metadata">

**Author:** ![Zackster](https://dev.lucee.org/user_avatar/dev.lucee.org/zackster/32/3484_2.png) [@Zackster](https://dev.lucee.org/u/Zackster)\
**Post date:** [September 19, 2019, 5:55pm UTC](https://dev.lucee.org/t/localmode/6067/2 "2019-09-19T17:55:54Z")

</div>

it automatically assigns variables in a function to the local scope

> **[TryCF Gist - 4451839fabe379612b98588b524de94c](https://trycf.com/gist/4451839fabe379612b98588b524de94c/lucee5?theme=monokai)**
>
> Code snippet: ......

> <https://gist.github.com/trycf/4451839fabe379612b98588b524de94c>

---

<div class="post-metadata">

**Author:** ![mmishyn](https://dev.lucee.org/user_avatar/dev.lucee.org/mmishyn/32/2227_2.png) [@mmishyn](https://dev.lucee.org/u/mmishyn)\
**Post date:** [September 20, 2019, 12:57pm UTC](https://dev.lucee.org/t/localmode/6067/3 "2019-09-20T12:57:50Z")

</div>

Thanks for reply, yes that what it says in documentation, it just was strange to see attribute value TRUE.

But I believe it still better from performance point to use scope like arguments, variables … ?

---

<div class="post-metadata">

**Author:** ![Zackster](https://dev.lucee.org/user_avatar/dev.lucee.org/zackster/32/3484_2.png) [@Zackster](https://dev.lucee.org/u/Zackster)\
**Post date:** [September 20, 2019, 1:03pm UTC](https://dev.lucee.org/t/localmode/6067/4 "2019-09-20T13:03:05Z")

</div>

> [@mmishyn](#):
>
> But I believe it still better from performance point to use scope like arguments, variables … ?

yes it is always better, you can see in the debugging if you enable implicit variable access

that said, it’s not going to make so much of a difference unless the code is called a lot,

localmode=“modern” is also about avoiding overwriting other variables outside the function which can cause strange and hard to debug errors

---

<div class="post-metadata">

**Author:** ![kenricashe](https://dev.lucee.org/user_avatar/dev.lucee.org/kenricashe/32/3476_2.png) [@kenricashe](https://dev.lucee.org/u/kenricashe)\
**Post date:** [July 24, 2025, 3:26am UTC](https://dev.lucee.org/t/localmode/6067/5 "2025-07-24T03:26:30Z")

</div>

My answer to the original question:

`localmode=true` is equivalent to `localmode="modern"`.

However, in the referenced `core/src/main/cfml/context/doc/Application.cfc` I see another undocumented value for localmode:

`this.localmode="update";`

What is the purpose of `"update"`?

---

<div class="post-metadata">

**Author:** ![Zackster](https://dev.lucee.org/user_avatar/dev.lucee.org/zackster/32/3484_2.png) [@Zackster](https://dev.lucee.org/u/Zackster)\
**Post date:** [July 24, 2025, 8:38am UTC](https://dev.lucee.org/t/localmode/6067/6 "2025-07-24T08:38:42Z")

</div>

it’s just an alias for `classic`

> <https://github.com/lucee/Lucee/blob/6.2/core/src/main/java/lucee/runtime/listener/AppListenerUtil.java#L485>
