Inline Components
Inline Components
Inline components let you define a component directly in your code without a separate .cfc file. Think of them like closures, but with full component capabilities - properties, methods, inheritance. Useful for quick one-off objects, callbacks, or when a full CFC feels like overkill.
<cfscript>
inline = new component {
function subTest() {
return "inline<br>";
}
};
dump("inline->" & inline.subTest());
dump(inline);
</cfscript>