I am 99.9999% sure the answer is no.

However, if the issue to avoid extra instantiation, why not put those methods in a CFC, then make one instance of that CFC, cache it, and then pass it into the other CFCs when they init()?  I've had good experience with that kind of setup, though most of the time the other CFCs are also cached, so all of that happens in my Application.cfm.
 
 
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of John Temm
Sent: Tuesday, May 18, 2004 8:43 AM
To: [EMAIL PROTECTED]
Subject: [CFCDev] Compile-time include directives?

Hi All,
I have a bunch of utility methods that I use in my DAOs.  I have a DAO class hierarchy 3 levels deep.  At the top of the tree is DataClass.  I had all of these utilities up in DataClass- stuff like isGUID() that I use all over the place.  I also wanted to make these available inside my generic utility class, so I pulled them out into a CFM that I CFInclude at the top of both DataClass and the utility class.  Works fine and the code stays in one place.
 
The bummer is that these methods are now hidden from reflection and thus the CFCExplorer help generation system as well.
 
This makes me think that the linkage is run-time.  Is there anyway (a la Actionscript) in CF to direct this to happen at compile-time for performance and hopefully to make the methods available to reflection as well?
 
I know some will say to wrap this code completely in its own CFC but I was hoping to avoid instantiating yet another object inside of my DAOs just to call these methods.
 
Cheers,
Chip

Reply via email to