I have several general purpose classes in my local plugins, Also several general purpose functions in each plugin's locallib.php. I have been copying them verbatim from one plugin to another, and only changing the local_[pluginname] prefix.
I have three such local plugins as part of my Moodle website now, with duplicates of those general purpose classes and functions. It would be nice if they were in just one place. Would it be a terrible transgression of Moodle fashion to move those general purpose classes and functions to one common local plugin, and have the other plugins depend on and include files from that common plugin? Does anybody do it that way?
I know that common classes and functions are usually defined in a moodle/lib/somethinglib.php file, or in a moodle/lib/classes/something.php file. But, I am trying to steer clear of adding any files in the core Moodle, and keep all my stuff in local plugins.