$world->macroenabled
This functions checks whether the specified macro exists and whether it is enabled.
You can pass either a macro number or name. If the macro does not exist, this function returns undef, so you can distinguish the case of a non-existant macro from a disabled one.
If the macro exists, then the function returns 0 or 1 depending on whether it is enabled or not. If you pass a name, and there are several macros with the same name, it returns a list with one value for each macro with that name, and each value is 0 or 1 depending on the state of the macro.