I was wondering if there are any constraints that i should be aware of when I want to use an identical copy of a module.
like i have ModuleA.. I want to copy it and rename the pasted version ModuleB

Iam aware of the following:
1- renaming the hook functions
2- renaming the global variables & those that sets in variable_set & variable_get.
3- i have no problem if its reading from a table in the DB (else than variable).

I appreciate any advice.

Regards

Comments

Anonymous’s picture

Not sure but I think it will work well just don't enable A and B at the same time unless your sure enough that their wont conflict.

cog.rusty’s picture

I think that generally you've got it right but you can't be 100% certain. It depends on the module too. How well it respects its namespace, whether it writes on common tables, how important it is if it does...

hhaidoura’s picture

Your right,
Incase the module is reading/writing from db table than that would be a mess.
but according to the module am using, I feel am on the safe side since it doesnt interact with any custom tables (no tables created by the module).

Although I assume that the tricky thing comes when the modules are running, there I should expect surprises and collisions of values.

I will keep you noticed after I test it.
thanks