5
There are 2 options:
- Use same prefix(module dirname) for classes, functions, sql tables, global variables, files (templates)
- Use dynamic prefix based on the module directory.
In the first case, you have to use a search and replace program to make a clone module. Publisher has its own search and replace and you can clone module using administration interface(module logo is also created on the fly which is very nice, thanks to ghost module)
The second case you need to use eval() to create classes and functions names on the fly. Good thing is that you just need to rename the module folder before install, bad thing is that your editor will not be able to use syntax highlight, cross referring, auto suggestion, etc. Since template files must be prefixed, some modules using this method provide a set of extra templates. The ones that don't, probably are not clonable, just renamable.