i *think* that the best way to achieve this is to allow a library/framework to run some code when being setup. for me the obvious place would be the "-meta" file (Gem-meta.pd) which has become the de-facto standard to add meta-information to a library.
It could be very nice and configurable.
I'm curious to look at the libdir loader source file but I don't .
Best.
Jérôme.
(a more advanced form would actually load (and loadbang) the meta-patch,
so it can run some real code)
There's also the possibility to load the meta-patch, but _always_ suppress loadbang. Then you'd have a rough equivalent to a c header file-- the lib author could basically declare things-- [struct], [table], [declare]-- but the "action" would need to happen down in the abstractions proper. Or at least it would have to _start_ there, as you could have a receiver in the meta patch, but it can't do anything until an abstraction (or external object) triggers it. Of course that won't keep ninjas from doing indecipherable ninja business inside hidden patches. But it will at least force the ninjas to ask on the list why they can't use loadbang in meta patches, and we'll have advance warning on how they plan to abuse the system. -Jonathan