Setting up a common perl / cpan environment

that's why I have been having a lot of fun with Perl at home for some time.

How much harder is it to do when you develop Perl modules (in my case it is mostly a catalyst) in a team? How do we make sure that we all got the same development environment (versions of Perl / Module)? Just updating CPAN? Do some teams set their CPAN 'private'?

+4
source share
2 answers

Using the following things should make your life easier.

check the local :: lib, you can easily create a server in which each member can also synchronize these modules.

You probably don't want to reflect all cpan. just the latest modules, so you'll use minicpan.

If you use the recommended modules in Task :: Kensho , then using the latest releases should not be a problem, as they should surprisingly change the API for you. Basically, having done this, you will make sure that you do not finish your team by reinventing the wheel or, hopefully, using 3 different modules that do the same.

And you want to make sure your team uses good Perl coding methods, not bad ones. A lot of bad ones. Read Perl Best Practices , remember that this is just a guide that you need to customize for your team and your style.

+6
source

It is not clear what is meant by "in a team."

If the team is located in a company, the best solution is, of course, a common directory in which only CPAN modules are installed.

If a team is a group of guys working together with their home computers, there are several solutions.

One who comes to mind looks like this:

  • You have a generic version of the “latest version of the module to install” in a file, available publicly from the Internet (on someone’s homepage, in your favorite version control system, in Google docs, whatever).

    / li>
  • Write a little Perl script that retrieves this file from the Internet or checks it from the repository, iterates through each CPAN module specified in the file, and verifies that the locally installed version is correct. If an update is needed, install the script update from CPAN .

  • Run this script as a scheduled task ( cron on Unix or at / scheduler on Windows) as the admin / root account, or at least an account for which perms is enough to install CPAN.

I won’t give details about the implementation of the script because I don’t even know if it is for Windows or Unix, and doing all these tasks is pretty routine Perl coding - if you get stuck, you are always welcome to ask questions about SO! :)

+4
source

Source: https://habr.com/ru/post/1305985/


All Articles