http://qs321.pair.com?node_id=285178

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

Hi All

I want to use Net::FTP::Recursive on my perl 5.0 installation. But this module is made for 5.6 (it contains some our's).

Now, I cannot install 5.6, but when I looked at the pm file, it is relatively simple to remove the our's so that it can run on the 5.0 installation.

Once I have done this, I just append the pm file to my own written pm file (which is a base class to handle ftp transactions at my company).

Is this OK?
Can I do this?
I mean, it will work, but is it legal?

All suggestions are welcome?
---------------------------
Dr. Mark Ceulemans
Senior Consultant
BMC, Belgium

Replies are listed 'Best First'.
Re: Net::FTP::Recursive on perl 5.0
by Corion (Patriarch) on Aug 20, 2003 at 13:52 UTC

    I've also backported some modules (to Perl 5.004 though), and in many cases, it was a simple matter of replacing :

    our $foo; # by use vars qw($foo);

    There are maybe some quirks, and some early Pelr5 versions do not understand qr(), but in most cases, you should be OK with this substitution.

    I recommend taking the included test suite and running it to see which parts of the module broke by backporting.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
Re: Net::FTP::Recursive on perl 5.0
by RMGir (Prior) on Aug 20, 2003 at 14:08 UTC
    You might consider contacting the author and asking him whether he'd like your patches for a backported version.

    He might already have one lying around, for that matter.

    His email address is listed on his CPAN author page.
    --
    Mike

Re: Net::FTP::Recursive on perl 5.0
by tcf22 (Priest) on Aug 20, 2003 at 13:16 UTC
    From my understanding it is legal(although I'm not a lawyer), but if you are going to redistribute it, you must give credit where credit is due.

    Although, I would suggest keeping it in a seperate file, perhaps changing the package name Net::FTP::Perl5Recursive or something like that. Then you could just distribute it with your PM file.
Re: Net::FTP::Recursive on perl 5.0
by aquarium (Curate) on Aug 20, 2003 at 13:41 UTC
    your company cannot patent/copyright the whole thing, only the code you wrote can be copyright. the part you pinched, that is Net::FTP code, must be excluded from any such proprietary patent/copyright, and the GPL disclaimer must be included (not stripped) from Net::FTP. In other words: you can't take it and put a copyright on GPL (OpenSource) software. My company uses (for Windows install) Cygwin, Perl, etc., but charges for the "system" and maintenance etc. The whole of the "system" (including proprietary binaries) is very flexible and open, but pretty useless to someone who doesn't have all the documentation on how it all works together and how to customize it well.
    By the way, careful on your implementation of "recursive FTP". i hope the ftp connection itself (inside a recursive loop) doesn't break the whole chain when one connection in the chain hangs etc.

      Luckily, Net::FTP::Recursive is dual licensed, so that the GPL does not necessarily apply. Giving credit is good though.

      perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web