I've been trying to get my head around private software licenses. I'm working for several companies at the same time - most of whom share my codes and all of whom want to own everything. It creates a bit of problem for me since I don't mind them owning the code, but at the same time I don't want to re-write code snippets (classes, methods, functions, etc) for each project. Even if I tried I don't think I could make the code unique enough - I would end up writing the exact same code again.
I would want to use a standard license (eg GPL, BSD, ..) to give the companies every right to use and redistribute my codes with the systems I develop for them, even if they are re-sold or duplicated. At the same time I don't want to get in trouble if the same code has been given to two different companies. Preferably (although this may be contradictory) I'd also want to restrict the companies from selling my codes to other companies, unless part of the systems I build for them.
Does this make any sense? Does such a license exist or do I have to go down the exhausting road of writing special contracts with each company?