Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Perl modules and the GPL

by tirwhan (Abbot)
on Feb 02, 2010 at 15:51 UTC ( #820967=note: print w/replies, xml ) Need Help??

in reply to Perl modules and the GPL

It's a bit hard for me to see what your main question is, but I'll try to shed light on some things anyway, hope it helps (disclaimer: I am not a lawyer and have no insight into licensing laws beyond what anybody has through the Internet).

If a Perl module on CPAN does not include a license, you cannot use or redistribute it without risking copyright infringement. No matter what CPAN is for in spirit, without a license the author has sole copyright over the code he posted and they could take you to court if they found you were using it (whether they'd win and what the repercussions would be is another matter, but for me personally the risks would be too high). So I believe your lawyers are right in regard to Sort::Topological.

If a program links to a GPL'ed library, and you distribute said program, you need to put it under a GPL-compatible license. Opinions apparently differ on whether "use"ing a Perl module constitutes "linking to a library" or not. Corion seems to think it does not (and from my reading, neither does the README file distributed with Perl), I believe it does, and so does the FSF. So IMO, any Perl script that uses a GPL-only (i.e. not dual-licensed) module needs to be distributed under a GPL-compatible license.

If your GPL'ed application wants to link to a library with a license not compatible with the GPL, you, and all other copyright holders of your program need to specifically allow linking your program to this library by modifying the license to your program. I put part of the last sentence in bold because this means that the copyright holders of any GPL-only libraries you use are also copyright holders to your program, so you need them to modify their license as well (see here for further explanation and an example of such a license modification).

So, for example, we have program (written by you), which also uses the module A.Frob, license GPL) and (copyright N.Nac, license Artistic 2.0/GPL). You also want to use module (copyright Evilcorp, license proprietary). To do so, you need to license under the GPL and write a specific permission into the license allowing use of You also need to get A.Frob to do the same for You don't need to bother N.Nac, since you can use his module according to the Artistic License 2.0, which includes a relicensing clause. If you also want to use (licensed under the Artistic License 1.0) I believe things are rather hairy and it is unclear to me whether you can legally include into a GPL'ed program without getting the author to relicense it under the GPL with an exemption clause.

Accordingly, a GPL app would not be able to use both DBD::DB2 and DBI, if DBI were a GPL-only module. Luckily it is dual-licensed, so that you can use the Artistic License for DBI and don't need to do anything. Unfortunately, DBI uses "the same license as Perl itself", which for Perl 5 is the Artistic License 1.0, which means that you are on previously mentioned murky ground if your application does indeed need to be licensed under the GPL (for example because it uses a third, GPL-only module). This probably comes as a bit of a surprise to you (it does to me), I'd be interested to hear any clarification on this that anyone can offer.

Just as an addendum, the linking of non-free libraries also has a special exemption for "system libraries" (i.e. ones distributed with the major components of your operating system), but that shouldn't matter to you, because I believe no Perl module falls under that exemption.

And I believe you are correct that the "dynamic linking" aspect of the GPL has never been tested in court, and I've never heard of a GPL court case that involves Perl modules either.

All dogma is stupid.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://820967]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2017-09-21 01:04 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (241 votes). Check out past polls.