tags:

views:

97

answers:

2

Hi, so I'm having a lot of fun with Perl at home for some time now.

How much more difficult do things get when you develop Perl modules (In my case it's mostly catalyst) in a team? How do we make sure we all got the same development environment (Perl/Module versions)? Simply by keeping up to date with CPAN? Do some teams setup their 'private' CPANs?

+6  A: 

Using the following things should make your life easier.

check out local::lib you could easily then create a server that each member could sync these modules too.

You probably don't really want to mirror all of cpan. just the most recent modules which is why you'd use minicpan.

If you're using recommended modules in Task::Kensho then using the latest releases shouldn't be a problem as they should be surprisingly changing API on you. Basically by doing this you make sure you don't end up with your team reinventing the wheel or hopefully using 3 different modules that do the same thing.

And you want to make sure that your team uses good Perl coding practices and not the bad ones. There are a lot of bad ones. Read Perl Best Practices, remember it's just a guideline you should tune it too your team and your style.

xenoterracide
Keep a salt shaker handy. A lot of the things described in _PBP_ aren't considered best practices anymore.
Ether
Right but it's at least better than going on a book written in 2000 which most of the other perl books were within 5 years of that.
xenoterracide
Thanks I'll check these out.
zedoo
+4  A: 

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

If the team is at some company, the best solution is of course a shared directory where only the CPAN modules you need are installed.

If the team is a bunch of guys working collaboratively from their home computers, there are a couple of solutions.

One that comes to mind is as follows:

  • Have a shared "latest version of module to install" list in a file, accessible publicly from the web (on someone's home page, your favorite source control system, Google docs, whatever).

  • Write a little Perl script which retrieves that file from the web or checks it out of repository, loops over each CPAN module listed in the file, and verifies that locally installed version is the correct one. If upgrade is needed, have the script install update from CPAN.

  • Have that script run as a scheduled job (cron on Unix, or at/scheduler on Windows) as admin/root account, or at least account which has enough perms to install CPAN modules.

I won't provide details of script implementation, because I don't even know if this is for Windows or Unix, and doing all those tasks are fairly routine Perl coding - if you get stuck, you are always welcome to ask follow up questions on SO! :)

DVK
Thanks for your answer.
zedoo