Question:
Say, I've three different modules, built with class objects tied to the module, and each of the three modules, have a common class object in a separate file for that class.
such that,
widget_processor_one
widget_processor_one.module
ClassObjectOne.php
ClassCommonThing.php
widget_processor_two
widget_processor_two.module
ClassObjectTwo.php
ClassCommonThing.php
widget_processor_three
widget_processor_three.module
ClassObjectThree.php
ClassCommonThing.php
when run, I end up with a "Fatal error: Cannot redeclare class ClassCommonThing...."
Does drupal have a common library area to put such things, such as a libs directory?
I doubt that "includes" was meant for this type of thing.
It doesn't seem that this type of structure is allowed.
How do I avoid class name collision and reuse the same class object without having to rename the thing?
Or is it intended that each module is independent and such sharing is not the drupal way.
Thanks

Comments
I ran into this myself
I ran into this myself a few weeks ago. I had several modules all needing to instantiate a PayPal class I had developed. The easy solution was to create a separate module whose sole purpose is to perform the common functions needed by my modules. In turn I made the "children" modules dependent on the "parent" module.
These two lines are something you'll want to look at including in your .info file:
Put this one in all of your .info files to keep them all together on the admin/build/modules page
package = YourModulePackage
Put this one in all of the "childModule.info" files
dependencies[] = parent_module
good idea
Thanks Mark!
On the drive home, I thought something along these lines, just wasn't sure exactly how to hook it all together.
I'll give this a try.
David Heskett www.mobot.org www.biodiversitylibrary.org www.citebank.org
PHP 5+
PHP 5+ only
http://php.net/manual/en/language.oop5.autoload.php