How do I make a function available to just a singl...
# cfml-beginners
o
How do I make a function available to just a single handler? I searched and all I could find was shared functions and putting it inside the Application.cfc file. The problem with the first one is I couldn't find any exampels. The second one has the issue of being available to the application globally.
d
I might not be grasping what you’re asking. But if you need a function only available within a specific handler, why not just make it a private function within that handler?
o
won't that make it a route as well?
d
Are you talking about a specific framework? ColdBox? If so, the docs say private functions aren’t executable outside of that handler… https://coldbox.ortusbooks.com/the-basics/event-handlers#private-actions