views:

39

answers:

1

I wish to give different licenses to different parts of my code.
Also I need to put some copy rights on several SQL statements.
Is it possible?
How should I organize my code to make it happen?

+2  A: 

If you're the copyright holder then you can put pretty much whatever provision you want on the code - if people don't like the restrictions/licenses they don't have permission to use the copyrighted material.

That said, if you make things confusing then people will generally not want to use your code (it would have to be fantastic or quite unique to overcome the desire to avoid complexity). Even standard licenses, like the GPL, applied to entire codebases are often considered to complex to deal with and people will often decide to move on to other code just because of that (soemtimes even if they're OK in general with the license requirements).

And really - licensing a few lines of code at a time? Seems excessive. Those must be some pretty impressive SQL statements.

Even the FSF suggests just putting small bits of code into the public domain rather than licensing it under the GPL.

Michael Burr
Not few lines, several hundreds of them.
Itay Moav
Are you trying to put different licenses on different lines/methods/classes/namespaces/projects? Give us some sense of the scale and we can probably help more
Martin
@Martin - you got it right. In the same file, I need to license differently each part of it.
Itay Moav
You're trying to differently license different parts of a single file? My advice would be to split up your code and have a single license per file. If that's not possible make sure to have really big comments indicating exactly what license covers the nxt part of the file
Martin
@Itay: I think you're probably making things far more complicated than they have to be, but this question is unique in a way that makes me curious. Maybe you can add to the question a couple of the licenses you want to 'selectively' apply.
Michael Burr
@Michael Burr, I wish there was a way to do private messages here ...
Itay Moav
@Itay: you're welcome to send me an email (see my profile page). But let me say a few things: 1) I'm not a licensing expert - from my point of view, this is just something I'm curious about for who knows what reason, and 2) *please don't send* me anything proprietary, 3) don't expect me to respond with anything intelligent (related to item 1 as well as lazyness)
Michael Burr