Posting whole modules to bboard -- bad practice/idea for any reason?

Hello,

Recently learned about the global BulletinBoard, ‘bboard’, and realized I can post whole modules, like this:

import my_module
bboard.post("my_module", my_module)

Which then allows me to access a singular import from almost anywhere in my code, breaking away from the overhead & clutter of having/passing single-use classes around everywhere.

This seems too good to be true. Are there any pitfalls or considerations I’m missing? I’ve been running with it, and so far, it works exactly as I’d expect and the organization of my code just went up 10x (thankfully, it’s early in the project, so I can easily pivot on this for now).

Thanks for reading!

Oh! That’s pretty cool–I didn’t know that we had that! :slight_smile:

I myself actually use a simple “common” script to do more-or-less the same thing–save that I only post objects, not modules. It seems to me to work well, and make my parameters less of a tangled mess, and without interfering with ShowBase.

As to posting modules… That I don’t know. I’ll let others weigh in on whether it’s a good idea or not… Offhand, I don’t see a problem–but I may just be missing something.