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

I use a machine to develop on and occasionally install modules on it using ppm. Often the scripts that I write on the development machine are used as part of an automated build system on a different machine. How can I get the build system to "pick up" any new modules that I've installed on the development system?


Perl is Huffman encoded by design.
  • Comment on Synching Perl module contexts between machines

Replies are listed 'Best First'.
Re: Synching Perl module contexts between machines
by InfiniteSilence (Curate) on Sep 12, 2005 at 22:29 UTC
    I ran into something similar in one of merlyn's articles entitled Mirroring Your Own Mini-CPAN

    I suppose if machine 1 has a CPAN mirror (or your abbreviated version thereof) you can use Randal's script to copy its contents from one machine to another. While you are at it you can have machine 1 update itself with the latest versions of modules automatically with some tweaking of the script.

    Celebrate Intellectual Diversity

      Thanks InfiniteSilence. I thought I'd seen something like that, but couldn't find it with Super Search.


      Perl is Huffman encoded by design.
Re: Synching Perl module contexts between machines
by xdg (Monsignor) on Sep 12, 2005 at 21:51 UTC

    One thought is that you could package up your scripts into a distribution with Module::Build and list module dependencies in the "requires" parameter. Then use the "ppmdist" action to create a PPM file that you install on your automated build machine and which should trigger installation of dependencies.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      I'm looking for something a little more automatic. Maybe I'll write a script to do it :)


      Perl is Huffman encoded by design.

        If it's installed module environment replication you want, maybe ASPN's PPM profiles will do what you want. (Though it does required a paid license.) I haven't tried it but it sounds like it might be another solution.

        -xdg

        Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re: Synching Perl module contexts between machines
by cbrandtbuffalo (Deacon) on Sep 12, 2005 at 23:24 UTC
    You might build something akin to Apache::Reload where you include a file with any new modules. The build process checks the file and installs any new modules needed. If it's empty, it just goes on it's way.

    You might be able to use this to trigger upgrading a module as well.