Loading ...
Sorry, an error occurred while loading the content.
 

Repository Common Practice

Expand Messages
  • unotecwiz
    Hello All, How do I make my code and modules portable ? Modules I developed locally I am using svn to sync with other members on my team. However, it becomes
    Message 1 of 8 , Nov 7, 2007
      Hello All,

      How do I make my code and modules "portable"?
      Modules I developed locally I am using svn to sync with other members
      on my team. However, it becomes troublesome when I utilize a module
      from cpan repos. By default, any module I download from cpan is stored
      on my local C:/. Therefore, when a next developer on my team runs my
      code on his PC it errors out because on his computer that module was
      not installed. Any suggestions on how to work around this problem?

      My current solution is to manually install the cpan modules I utilized
      one by one on his PC.

      Note: I am using v5.8.8 built for MSWin32-x86-multi-thread.

      Thanks in advance

      -Imran
    • David Golden
      ... If you develop your modules locally in a standard distribution package including a Makefile.PL or Build.PL, then you can include your CPAN dependencies
      Message 2 of 8 , Nov 7, 2007
        On Nov 7, 2007 10:56 AM, unotecwiz <unotecwiz@...> wrote:
        > How do I make my code and modules "portable"?
        > Modules I developed locally I am using svn to sync with other members
        > on my team. However, it becomes troublesome when I utilize a module
        > from cpan repos. By default, any module I download from cpan is stored
        > on my local C:/. Therefore, when a next developer on my team runs my
        > code on his PC it errors out because on his computer that module was
        > not installed. Any suggestions on how to work around this problem?

        If you develop your modules locally in a standard distribution package
        including a Makefile.PL or Build.PL, then you can include your CPAN
        dependencies there. When your co-workers synchronize, they should run
        the *.PL file and it will warn them if they need to install
        dependencies from CPAN.

        With a modern version of CPAN.pm, you can even have CPAN.pm process a
        local directory -- which will automatically install dependencies from
        CPAN if your CPAN.pm is configured to do so.

        > cpan .

        (That's a dot for "current directory) That will install the current
        directory as if it were an unpacked CPAN distribution, including
        dependencies as normal.

        Regards,
        David
      • unotecwiz
        Actually, I am using the activestate implementation of perl. Would that be an issue, when using cpan.pm?
        Message 3 of 8 , Nov 7, 2007
          Actually, I am using the activestate implementation of perl. Would
          that be an issue, when using cpan.pm?
        • Jim Keenan
          ... It depends on which CPAN modules you need to import into your programs. Those that are pure-Perl: no problem. Those that include .xs files to wrap
          Message 4 of 8 , Nov 7, 2007
            >From: unotecwiz <unotecwiz@...>
            >Date: 2007/11/07 Wed PM 12:20:55 CST
            >To: perlsemny@yahoogroups.com
            >Subject: [perlsemny] Re: Repository Common Practice

            >Actually, I am using the activestate implementation of perl. Would
            >that be an issue, when using cpan.pm?
            >

            It depends on which CPAN modules you need to import into your programs. Those that are pure-Perl: no problem. Those that include .xs files to wrap around C libraries: problem.

            If you're using ActivePerl you should get familiar with the 'ppm' utility, which is the customary way to deal with CPAN modules that are not pure-Perl.

            (Of course, the previous respondent would be glad to talk to you about Strawberry Perl, the alternative to ActivePerl for Perl development on Windows.)

            The more I think about your question, however, the more I think the real, long-term problem is the fact that you and your colleagues are each developing on your own Windows boxes rather than on a central server. It appears from your description that only your Subversion repository is centralized. I suspect that what you need over the long haul is a central development server, where a sysadmin installs all the Perl packages you all need for development.

            Jim Keenan
          • David Golden
            ... The most recent version of ActivePerl should be CPAN ready -- and if you install either MinGW (free) or MS Visual C, ActivePerl will automatically detect
            Message 5 of 8 , Nov 8, 2007
              On 11/7/07, Jim Keenan <jkeen@...> wrote:
              > >Actually, I am using the activestate implementation of perl. Would
              > >that be an issue, when using cpan.pm?
              > >
              >
              > It depends on which CPAN modules you need to import into your programs. Those that are pure-Perl: no problem. Those that include .xs files to wrap around C libraries: problem.
              >
              > If you're using ActivePerl you should get familiar with the 'ppm' utility, which is the customary way to deal with CPAN modules that are not pure-Perl.

              The most recent version of ActivePerl should be CPAN ready -- and if
              you install either MinGW (free) or MS Visual C, ActivePerl will
              automatically detect it and should be able to compile .xs as well.'

              David
            • Steven Lembark
              ... If your Makefile.PL has the appropriate dependencies then you will all have the modules installed. Another approach is to create a required code bundle
              Message 6 of 8 , Nov 8, 2007
                > The more I think about your question, however, the more I think the
                > real, long-term problem is the fact that you and your colleagues are
                > each developing on your own Windows boxes rather than on a central
                > server. It appears from your description that only your Subversion
                > repository is centralized. I suspect that what you need over the long
                > haul is a central development server, where a sysadmin installs all the
                > Perl packages you all need for development.

                If your Makefile.PL has the appropriate dependencies then
                you will all have the modules installed.

                Another approach is to create a 'required code bundle' of
                modules you know you need, distribute that (doesn't need
                to be on CPAN for this to work) and then have everyone
                install that one as part of their development effort.
              • Joseph Annino
                I ve run into a similar issue with a project I am working on. We do have a shared development server, but the option of being able to work with a local box is
                Message 7 of 8 , Nov 8, 2007
                  I've run into a similar issue with a project I am working on. We do
                  have a shared development server, but the option of being able to work
                  with a local box is something we want to keep there. It not only
                  makes it easier to install on new boxes, but can be useful for doing
                  benchmarks or crazy branches.

                  We've just put a small script, cpan.sh in the repository. It just
                  contains the cpan command, followed by all of the needed modules.
                  Running it will cause cpan to load in all those and their dependencies.

                  What I would like to do eventually though is make this into a custom
                  bundle, and make cpan install the modules into the local working
                  directory (so as not to pollute the host system, or require root).
                  Neither is probably too hard, just a matter of having the time to do
                  it. Some pointers on how to do that would be helpful though.

                  On Nov 8, 2007, at 8:44 AM, Steven Lembark wrote:

                  >
                  > > The more I think about your question, however, the more I think the
                  > > real, long-term problem is the fact that you and your colleagues are
                  > > each developing on your own Windows boxes rather than on a central
                  > > server. It appears from your description that only your Subversion
                  > > repository is centralized. I suspect that what you need over the
                  > long
                  > > haul is a central development server, where a sysadmin installs
                  > all the
                  > > Perl packages you all need for development.
                  >
                  > If your Makefile.PL has the appropriate dependencies then
                  > you will all have the modules installed.
                  >
                  > Another approach is to create a 'required code bundle' of
                  > modules you know you need, distribute that (doesn't need
                  > to be on CPAN for this to work) and then have everyone
                  > install that one as part of their development effort.
                  >
                  >
                • Jeff Anderson
                  Hi Joseph, feel free to take a peek into the internals of Krang: http://www.krangcms.com/ Krang can be installed as a local copy, and it handles CPAN module
                  Message 8 of 8 , Nov 8, 2007
                    Hi Joseph, feel free to take a peek into the internals of Krang:
                    http://www.krangcms.com/

                    Krang can be installed as a local copy, and it handles CPAN module
                    dependencies by having you add the tar balls to a src directory, and
                    Krang will install all the modules and their dependencies into a local
                    working directory without the need for root access. (But i should note
                    that root access is needed to install Krang in the long run ...)

                    On Nov 8, 2007 3:02 PM, Joseph Annino <joeaguy@...> wrote:
                    > I've run into a similar issue with a project I am working on. We do
                    > have a shared development server, but the option of being able to work
                    > with a local box is something we want to keep there. It not only
                    > makes it easier to install on new boxes, but can be useful for doing
                    > benchmarks or crazy branches.
                    >
                    > We've just put a small script, cpan.sh in the repository. It just
                    > contains the cpan command, followed by all of the needed modules.
                    > Running it will cause cpan to load in all those and their dependencies.
                    >
                    > What I would like to do eventually though is make this into a custom
                    > bundle, and make cpan install the modules into the local working
                    > directory (so as not to pollute the host system, or require root).
                    > Neither is probably too hard, just a matter of having the time to do
                    > it. Some pointers on how to do that would be helpful though.
                    >
                    >
                    > On Nov 8, 2007, at 8:44 AM, Steven Lembark wrote:
                    >
                    > >
                    > > > The more I think about your question, however, the more I think the
                    > > > real, long-term problem is the fact that you and your colleagues are
                    > > > each developing on your own Windows boxes rather than on a central
                    > > > server. It appears from your description that only your Subversion
                    > > > repository is centralized. I suspect that what you need over the
                    > > long
                    > > > haul is a central development server, where a sysadmin installs
                    > > all the
                    > > > Perl packages you all need for development.
                    > >
                    > > If your Makefile.PL has the appropriate dependencies then
                    > > you will all have the modules installed.
                    > >
                    > > Another approach is to create a 'required code bundle' of
                    > > modules you know you need, distribute that (doesn't need
                    > > to be on CPAN for this to work) and then have everyone
                    > > install that one as part of their development effort.
                    > >
                    > >
                    >
                    >
                    >
                    >
                    > Yahoo! Groups Links
                    >
                    >
                    >
                    >



                    --
                    jeffa
                  Your message has been successfully submitted and would be delivered to recipients shortly.