Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

licensing perl code

by marvell (Pilgrim)
on Apr 09, 2003 at 16:50 UTC ( [id://249298]=perlquestion: print w/replies, xml ) Need Help??

marvell has asked for the wisdom of the Perl Monks concerning the following question:

A client of mine has asked me to investigate the possibity of licensing an application they have written in Perl.

From my days of working in licensing, the only solution I've used for licensing scripts is to put some vital application function in an external shared library, written in C, or something which is then licensed. Thus, in order to use the scripts which need this function, the license requirements have to be met.

I note that presently, the application is written to work on multiple platforms.

I can think of no other way of solving this problem other than to supply a complied library for each platform, and having an associate perl module which calls it.

So, my questions are these:

Is this the way that other people do it, or is there some better way?

Are there any caveats associated with supplying multiple compiled libraries with perl modules, assuming some install script is made to choose the right one?

--
Steve Marvell

Replies are listed 'Best First'.
Re: licensing perl code
by dragonchild (Archbishop) on Apr 09, 2003 at 16:56 UTC
    Personally, I think you're looking at the problem wrong. Instead of enforcing a license in the code, enforce it in the legalities.

    I would go ahead and have your legal department write up a license that meets the financial needs of the client. Make sure you cast the license not as a "pay me continuously for source code". Instead, cast it as "Pay me once for source code and pay me continuously for updates and support".

    The difference is licensing the after-sale relationship, not the sale itself. Remember - no-one who's smart will ever get code without a support license, regardless of how implicit it is. That's why RedHat has a growing business, even though they give away their Linux distro.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      The idea is to stop them installing it on multiple machines and giving it away to their mates, rather that anything else.

      The relationship is specifically "pay me proportionately to how much you use the product".

      Code based licensing is a lot easier to manage than trust, catch and legal.

      --
      Steve Marvell

        Do you always consider your potential clients to be criminals? Copying code without a license is illegal. I'd say, don't do business with criminals. Besides, if they really are criminals, they probably have the means and the will to crack whatever you cook up. Compiled code can be decompiled. License keys can be broken.

        Code based licensing is a lot easier to manage than trust, catch and legal.

        I used to work for a company that sold software with a price tags up to several millions of dollars. And the customers could get the source code for free as well. We never had a problem that code was copied illegally. But then, we didn't deal with the maffia.

        Abigail

        Let me get this straight - you want to enforce whether or not I have installed your libraries on two front-end servers vs. one. What if they're a pool serving the same website? What if I run more than one website on the same server? How do you license that?!? More importantly, even with protection of library and the like, how do you enforce that?

        Also, you're talking about compiling and the like. Well, that has never stopped consulting firms from giving their consultants free copies of Windows 2000 or Visual Studio, Professional Edition. (I know several people who have received both for free.) Now, those people can never call up Microsoft and receive support for those products, nor can they receive free or reduced-price updates. (They shouldn't be able to receive bugfixes, but Microsoft apparently lets bootleg copies be patched.) How are you going to do better than Microsoft in the licensing arena?

        If you're not going to trust your client to some minimal degree, don't do business with them. I mean, they might not pay you and then you'd be up a smelly creek without a paddle, wouldn't you?

        ------
        We are the carpenters and bricklayers of the Information Age.

        Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

        Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Re: licensing perl code
by Fletch (Bishop) on Apr 09, 2003 at 18:28 UTC

    You're confusing `copy protection' with `licensing'. The later requires a lawyer, the former is most likely just wasting both your and your client's time (as it's going to create headaches for you in creating and distributing your code, and them in using it).

      I suspect it's in between, since it's enforced restricted use.

      --
      Steve Marvell

Re: licensing perl code
by zenn (Sexton) on Apr 09, 2003 at 18:27 UTC
    You can put any license you want in the Perl script. Perhaps you mean the use of a license code to enable the use of a program. Many commercial programs have this feature, but I can't remember any that is really unbreakable. Any crack you want is available in the net. Besides it is really easy to modify the scritp code to skip the extern function. Unless you code the real functionality in that function you won't enforce your policy. If you do it's probably better to code the whole program in that language, because you will end with a thin wrapper to that code.

    I suggest you to put your code under your preferred license and enforce the right use the legal way. It won't make no difference anyway to have this protection scheme.

    Zenn

      I noted that this library would specifically contain a vital function. It only takes one and that's it.

      It doesn't need to be bullet proof, just harder than throwing in a few perl comments.

      --
      Steve Marvell

Re: licensing perl code
by hiseldl (Priest) on Apr 09, 2003 at 20:49 UTC

    update: ASP is Application Service Provider

    I've worked at a couple startup companies and learned a couple different ways to structure licensing, these two may help you:

    1. Use an ASP model where you run the script on your server and license access to that server to perform the critical functions. This way you can publish an API to the service without compromising the integrity of your code.
    2. Another way is to have the customer sign a non-disclosure agreement spelling out that they will pay a set amount of damages (make the amount high enough that they won't want to pay it) if they disseminate the script without your permission.

    Good Luck!

    --
    hiseldl
    What time is it? It's Camel Time!

Re: licensing perl code
by Anonymous Monk on Apr 09, 2003 at 20:37 UTC
    Injection There are perlscript => binary convertors, when you are concerned about sourcecode piracy. Murat
      And they all suck. Until Perl is compilable to some bytecode (such as Parrot in Perl6), Perl will not be compilable to some "binary".

      Using something like perl2exe is NOT an option if you intend on having source privacy. Doing so for that reason is foolhardy.

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

        Care to crack a current version of perlapp exe? I have been involved with cracking these on occasion and the latest versions are not so trivial. Not unbreakable of course, but certainly requiring significant effort to reverse. At the end of the day this is all that security is about - raising the bar to make it less worthwhile to steal than to buy.

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://249298]
Approved by dragonchild
Front-paged by TStanley
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-28 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found