Search code examples
perlgnuperl-modulecpan

Giving Credit for Perl Module


I wrote a script for my company and I am using some libraries I obtained from CPAN. My manager wanted me to consolidate and remove the extra libraries - which is a little funny because I include them for the script to work.

A few notes:

  • I do not have root access on this server nor can I request access
  • To use CPAN modules w/o root I have them installed to my user directory
  • To allow other users to run my scripts I usually include a folder called 'libs' and inside of my script's directory and in the script I have: use 'libs'; at the top before I use my CPAN modules.

The only solution I have right now is to literally put the contents of the perl modules inside of my perl script. However I want to give credit where it is due and also not get in trouble for including opensource code w/o proper credit to its authors and organizations.

Therefore, how should I go about this? I am not trying to get away with anything.. I honestly want to go about doing this the right way.

All three modules say "licensed under the same terms as Perl itself" but I feel like it shouldn't be this easy.

I would also like to explore any other ideas too!

The modules are:

  • Text::Table
  • Text::Aligner
  • Term::ANSIColor

Solution

  • If the modules are pure Perl modules, you may be able to simply append the code (including those package statements) into your program. I'd also include the POD which would include the copyright statements and the names of the authors too. That should satisfy the Artistic License Requirement (but may not satisfy GNU licensing requirements).

    Another possibility is to use Perlbrew which will allow you to install a user version of Perl on the system. This way, you can install CPAN modules without needing Administrative permission, and you can tell other users to use Perlbrew too.

    I use it because I can install and switch between various versions of Perl which allows me to test my Perl scripts in various versions of Perl. I've also used it on our servers where I need a newer version of Perl or modules that weren't included in the standard release.

    You need to get your IT approval before installing Perlbrew, but a lot of times they're relieved that they no longer have to be bothered with maintaining and installing CPAN modules for your use.