no, a compile unit is a C file... and given a patch contents all ends up in xpatch.cpp, its all one compile unit. (hence my 'warning')
in programming there are various reasons for 'global' being bad, but like all things, it depends...
class scoping a global (static) is neither good nor bad, it depends how you use it, and even the most fervent object oriented programmers have used singletons which are still essentially a global, albeit alleviating some of the negatives of globals.
but yeah, generally, you avoid globals with objects as you don't wont one object instance to affect another.
also, be careful with Axoloti , axoloti objects are not classes... e.g. each instance of an object becomes a class.
generally, its a good idea to check out xpatch.cpp,
Ive probably mentioned this in the past, and you may be doing this , but I recommend when you get to the level of creating custom objects, its a good time to start looking at the generated code, to get a better understanding of axoloti. create a very simple patch, compile it and then look at xpatch.cpp and get a good feeling of how the 2 related, and how it works.
Of course this is not 'required', but I personally learnt a lot from this... and even now, when a patch doesnt work, it can be instructive to go look at the code thats be generated , to see why.
tip: a good code editor and 'code beautifier' is useful to navigate through it.
advance tip: when your developing objects, and trying to fix build issues, if you have expert mode on, you can edit the xpatch.cpp and then just compile to try stuff quickly (e.g. to fix compile errors), then apply to your custom object when you know it works.