How to ensure user sees and agrees to a license 
Author Message
 How to ensure user sees and agrees to a license

Quote:

> My company has given me permission to distribute a perl program to
> some people outside the company.  It is not open source,
> but it is our first step in that direction.
> The text of the "license" is standard boilerplate, as modified
> slightly by the company lawyer, e.g.
> # THIS SOFTWARE CARRIES NO WARRANTY, EXPRESSED OR IMPLIED. THE USER
> # ASSUMES ALL RISKS, KNOWN OR UNKNOWN, DIRECT OR INDIRECT, ... etc.
> The question is, how can we ensure that the user of the software
> sees this text, and agrees to it?

A link or crossreference to the license should work. If you really
need to be sure each user on a machine that might use it has seen
the text (it's impossible to tell they are lying if they say they
agree), then you could print it out at the beginning of every run.
You could use Win32:Registry on Windows, or count on the user having
access to his home directory on most Unices to keep track of which
users have seen the text.

Quote:
> Are there any better ways to do this?
> Is there some code I could reuse to handle the prompting, etc.
> I suspect that most users will be running this in a DOS box (aka
> command window) on Windows NT.  One problem is that the text is more
> than 25 lines, and so the top would scroll off the screen.  I think I

You could make whatever program that displays the text prompt
for input and take input on STDIN every so many lines. That's
no big deal.

Quote:
> Right now the program is a single file.  Maybe the license should be
> shown as part of the "install" process.  But then an install program
> would need to be written.

This will only work for the admin of the box, not the users. Then
again, the admin is somewhat responsible for the user's behavior
when it comes to licensing. Their employer definitely is while they
are on the clock (in most if not all parts of the United States,
anyway).

Quote:
> Another approach might be to always write to stderr a one line message
> reminding users that they agree to the license, which they can see the
> full text of by entering the --license option.  (I use Getopt::Long so
> this could be abbreviated down to -l.)  Even this one line message
> could be suppressed if the user provided e.g. the --agree option.

This is a good idea. I'd put the text of the agreement in the
__DATA__ section instead of in a variable inside the main
body of code. Many programs simply refer the user to an outside
document that came with the program, but some do what you mention
here.

Quote:
> Any other ideas, and code snippets, would be appreciated.

my $foo = 0;
while(<DATA>) {
    print;
    if( $foo % 20 == 0 ) {
        print "Please press Enter to continue.\n";
        my $bar = <STDIN>;
    }

Quote:
}

DATA and STDIN are opened already, so your program doesn't
have to open them. In fact, if you do open DATA, it loses
its magic behavior of reading what's beyond the __END__ or
__DATA__ marker at the end of the program code.

Chris

--
Christopher E. Stith
If they can get you asking the wrong questions, they don't
have to worry about the answers.
  -- Thomas Pynchon, Gravity's Rainbow



Tue, 02 Sep 2003 08:24:12 GMT  
 How to ensure user sees and agrees to a license
: My company has given me permission to distribute a perl program to
: some people outside the company.  It is not open source,
: but it is our first step in that direction.

: The question is, how can we ensure that the user of the software
: sees this text, and agrees to it?

Well it's not specific to Perl in anyway, but I've seen many sites that
require you to fill in a form to download the software.  The form includes
the license text and a button that says something like "I have read and
agreed to the license".  Then instead of giving them the script away
directly, you give them the url of the well neigh trivial cgi script that
you set up that sends them your perl script after agreeing to the license.

Otherwise, possibly a self extracting "install" script that replaces
itself so that the message only shows the first time.  (Not possible on
all platforms, but fun to write).

Or just a send a simple minded install script that prompts with the
license and then extracts the real script into a file,

        #!perl
        print "This is the license, do you agree yes/no: "
        $yes_no = <STDIN>;
        die "you must agree" unless $yes_no eq "yes";
        open  SCRIPT , ">the_script.pl" or die $!;
        print SCRIPT   <DATA>           or die $!;
        close SCRIPT                    or warn $!;
        __DATA__
        #!perl
        #the_script.pl
        # etc.

or even just a zip file with an embedded comment.

----
Want to access the command line of your CGI account?  Need to debug your
installed CGI scripts?  Transfer and edit files right from your browser?

What you need is "ispy.cgi" - visit http://nisoftware.com/ispy.cgi



Tue, 02 Sep 2003 08:43:44 GMT  
 How to ensure user sees and agrees to a license
[ Posted and cc'd to cited author ]


about licensing and included the following code:

Quote:
>my $foo = 0;
>while(<DATA>) {
>    print;
>    if( $foo % 20 == 0 ) {
>        print "Please press Enter to continue.\n";
>        my $bar = <STDIN>;
>    }
>}

I don't think this does what you expect it do.  It asked me to
press Enter to continue for every line, even the first one.

So, is the correct answer $foo++ % 20 or ++$foo % 20?

Tramm
--

 /|\  http://www.swcp.com/~hudson/          H 505.323.38.81   /\  \_  

  0                                                            U \_  |



Wed, 03 Sep 2003 12:29:24 GMT  
 How to ensure user sees and agrees to a license

Quote:

> [ Posted and cc'd to cited author ]

> about licensing and included the following code:
>>my $foo = 0;
>>while(<DATA>) {
>>    print;
>>    if( $foo % 20 == 0 ) {
>>        print "Please press Enter to continue.\n";
>>        my $bar = <STDIN>;
>>    }

### where I was going to increment for clarity's sake

Quote:
>>}
> I don't think this does what you expect it do.  It asked me to
> press Enter to continue for every line, even the first one.
> So, is the correct answer $foo++ % 20 or ++$foo % 20?

Quite right, either way you wish. I forgot to increment at all.
I put a comment in while responding which show where I actually
was going to increment, using either $foo++ or ++$foo.

Good catch, the throw was well off the mark. ;-)

Chris

--
Christopher E. Stith
Parking for people we like only. All other vehicles will be vandalized.



Sat, 06 Sep 2003 00:28:43 GMT  
 How to ensure user sees and agrees to a license
[ Posted and cc'd to cited author ]


Quote:
> my $foo = 0;
> while(<DATA>) {
>    print;
>    if( $foo % 20 == 0 ) {
>        print "Please press Enter to continue.\n";
>        my $bar = <STDIN>;
>    }

> ### where I was going to increment for clarity's sake

> }

You should give this one a try, too.  I don't think it will do what
you expect.

Tramm
--

 /|\  http://www.swcp.com/~hudson/          H 505.323.38.81   /\  \_  

  0                                                            U \_  |



Sat, 06 Sep 2003 01:41:06 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Problem with delphi 5

2. how to ensure script is only run by one user at a time

3. App to let user post sched request w/o seeing other items

4. Sort Alphabetically

5. timelocal and locatime don't agree!!!

6. Win32 - AddConnection Error, How do you ensure a connection is closed

7. Ensuring only one of me is running?

8. Ensuring backup system is the same as primary

9. Ensuring only one running copy of a program

10. How do I ensure Perl CGI scripts are secure

11. library wrapper licensing

12. License of module files

 

 
Powered by phpBB® Forum Software