views:

274

answers:

5

I am trying to make sure I license some personal Perl scripts correctly.

Do any Perl scripts that I create need to be licensed as GPL (i.e a copyleft license) due to using the GPL licensed Perl interpreter?

Please can you back up any answers with appropriate links. Thanks

+12  A: 

No your scripts won't have to GPLed too. The actual perl executable is GPL your own script have no restrictions on them.

http://dev.perl.org/licenses/

That's the first link you get in google for : perl script licence

Furthermore this is mentioned in the GPL faq

http://www.gnu.org/licenses/gpl-faq.html#IfInterpreterIsGPL

Pat
Cheers, its funny, i just posted that link too :-)
DEzra
I was unsure tho, because there seems to be alot of discussion as to what is deemed 'linking' or 'calling to' gpl functions/apis
DEzra
Having read the faq link, i think there is more to it, i still have to check the cpan modules that my scripts use:'...However, when the interpreter is extended to provide “bindings” to other facilities (often, but not necessarily, libraries), the interpreted program is effectively linked to the facilities it uses through these bindings. So if these facilities are released under the GPL, the interpreted program that uses them must be released in a GPL-compatible way. ...'
DEzra
+3  A: 

Larry Wall (the creator of Perl) says No: http://dev.perl.org/licenses/

AllenJB
+5  A: 

No. The license on your scripts is your own. That's what Larry Wall says.

Donal Fellows
+11  A: 

From http://www.gnu.org/licenses/gpl-faq.html#IfInterpreterIsGPL

When the interpreter just interprets a language, the answer is no. The interpreted program, to the interpreter, is just data; a free software license like the GPL, based on copyright law, cannot limit what data you use the interpreter on. You can run it on any data (interpreted program), any way you like, and there are no requirements about licensing that data to anyone.

However, when the interpreter is extended to provide “bindings” to other facilities (often, but not necessarily, libraries), the interpreted program is effectively linked to the facilities it uses through these bindings. So if these facilities are released under the GPL, the interpreted program that uses them must be released in a GPL-compatible way. The JNI or Java Native Interface is an example of such a binding mechanism; libraries that are accessed in this way are linked dynamically with the Java programs that call them. These libraries are also linked with the interpreter. If the interpreter is linked statically with these libraries, or if it is designed to link dynamically with these specific libraries, then it too needs to be released in a GPL-compatible way.

Another similar and very common case is to provide libraries with the interpreter which are themselves interpreted. For instance, Perl comes with many Perl modules, and a Java implementation comes with many Java classes. These libraries and the programs that call them are always dynamically linked together.

A consequence is that if you choose to use GPL'd Perl modules or Java classes in your program, you must release the program in a GPL-compatible way, regardless of the license used in the Perl or Java interpreter that the combined Perl or Java program will run on.

Ivan
+4  A: 

You own the copyright to code that you write and can license it in whatever manner you choose. However, if you utilize modules that you didn't write you have to abide by the license for those modules.

If all you use is core modules, you're okay. Perl itself (the interpreter and everything in the core distribution) is dual-licensed under the Artistic 2.0 license and the GPL. (The original Artistic license has been superseded; among the criticisms is that it wasn't GPL-compatible.) The Artistic license is not "infectious" the way the GPL is. If you use modules from CPAN (or elsewhere) you'll have to check their license. Most of the code on CPAN is released under the same terms as Perl1 but some modules use other licenses.

1) Either Artistic for older code or dual-licensed as Artistic 2.0 and GPL for newer code.

Michael Carman