chapmandu
02/12/2025, 12:03 AMshout method have access to the variables scoped excl in the calling index.cfm template? Is the variables scope considered static? (Lucee has an actual static scope)
// Shouter.cfc
component {
public static string function shout(v) {
return UCase(arguments.v) & variables.excl; // should
}
}
// index.cfm
<cfscript>
variables.excl = "!";
shouts = ["twist", "shout"].map(Shouter::shout);
dump(shouts);
</cfscript>
Lucee 5.4bdw429s
02/12/2025, 12:08 AMbdw429s
02/12/2025, 12:08 AMbdw429s
02/12/2025, 12:08 AMbdw429s
02/12/2025, 12:08 AMvariables scope is not accessible in a static method if I were to guess.chapmandu
02/12/2025, 1:22 AM