See my comments at:
Creating Globally Accessible User Defined Functions In ColdFusion (Safer Version)
Here was the final solution:
[Put in application.cfc:]
<cffunction name="onApplicationStart">
. . . snip . . .
<cfscript>
application.globalmethods = structnew();
keys = structkeylist(this);
for (i=1; i LTE listlen(keys); i=i+1) {
key = listgetat(keys,i);
if (iscustomfunction(this[key]) and left(lcase(key),2) NEQ "on")
structinsert(application.globalmethods, key, this[key]);
}
application.registerglobalmethods = this.registerglobalmethods;
</cfscript>
. . . snip . . .
</cffunction>
<cfinclude template="GlobalFunctions.cfm">
<cffunction name="registerglobalmethods" output="no">
<cfset StructAppend(variables, application.globalmethods, true)>
</cffunction>
Finally, in any cfc that uses a global function, call the register function, then you can use any global function (with no scope prefix):
<cfset application.registerglobalmethods();>
Now, you could skip the register function and just use:
<cfset StructAppend(variables, application.globalmethods, true)>
when ever a cfc needed to use global functions. But I think this is more readable.