[dev] Fwd: include vs include_once in Horde_Autoloader

Michael M Slusarz slusarz at horde.org
Tue Aug 4 18:34:47 UTC 2009


Quoting Michael Rubinsky <mrubinsk at horde.org>:

> The commit:
> http://cvs.horde.org/diff.php/framework/Autoloader/lib/Horde/Autoloader.php?rt=horde-git&r1=73744b1e4c54f4389a14dcf69fd5c94081f48de8&r2=069c5ad672239731cb4804703b523e15d36e9f4b
>
> breaks things when calling any external code libraries like PEAR  
> that perform class_exist calls (actually any actions that would  
> trigger an Autoloader) in the case where the class it's searching  
> for is named the same as any of our files in the current include_path.

This might be a question to reserve for Chuck when he has a second.   
He was the one that told me that we should be using include here  
instead of include_once.  I had changed it to include_once awhile back  
when we were first switching code over to Git.

I'm not sure if his concern was due to the overhead of the  
include_once call or for some other reason.  But I agree that with  
libraries that we can't control, it may be a necessary evil.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list