Fastest, cheapest way to create a fresh, throw-away installation of perl using perlbrew?Building Perl for OS X - Architecture-Specific Compile Optionsperlbrew and local::lib at the same time?Install problems with Spreadsheet::ParseExcelCan't install perl with perlbrewTrouble Installing New Version of Perl Using PerlbrewInstalling ancient perls with PerlbrewPerl - Local::lib not consistently finding the local path in @INC - conflict with perlbrew?syncing perlbrew and cpan install locationsCan't locate Parallel/ForkManager.pm in @INCPerlbrew doesn't list installed versions of Perl

Polynomials with natural coefficients arising from exponentiation and sums

What is the intuition for higher homotopy groups not vanishing?

Applying for jobs when I have an obvious scar

Why didn't Balak request Bilam to bless his own people?

Do pedestrians imitate automotive traffic?

Linearize or approximate a square root constraint

Can a creature sustain itself by eating its own severed body parts?

A bicolour masyu

How far off did Apollo 11 land?

Weight functions in graph algorithms

Why do we need an estimator to be consistent?

Inside Out and Back to Front

Satellite in orbit in front of and behind the Moon

Do gauntlets count as armor?

Why is there an extra "t" in Lemmatization?

Improving an O(N^2) function (all entities iterating over all other entities)

What's the difference between 1kb(64x16) and 1kb(128x8) for EEPROM memory size?

Can a crisscrossed metallic skeleton resist earthquakes for buildings?

Why does airflow separate from the wing during stall?

"move up the school" meaning

What's a German word for »Sandbagger«?

What would be the effects of (relatively) widespread precognition on the stock market?

Have any lunar probes used a cold shield?

Has anyone ever written a novel or short story composed of only dialogue?



Fastest, cheapest way to create a fresh, throw-away installation of perl using perlbrew?


Building Perl for OS X - Architecture-Specific Compile Optionsperlbrew and local::lib at the same time?Install problems with Spreadsheet::ParseExcelCan't install perl with perlbrewTrouble Installing New Version of Perl Using PerlbrewInstalling ancient perls with PerlbrewPerl - Local::lib not consistently finding the local path in @INC - conflict with perlbrew?syncing perlbrew and cpan install locationsCan't locate Parallel/ForkManager.pm in @INCPerlbrew doesn't list installed versions of Perl






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I tried doing the following. First, I install a relocatable perl, e.g.:



% perlbrew -Duserelocatableinc -j4 -n --as perl-5.28.1-fresh_src 5.28.1


Then, whenever I need a new throw-away fresh installation of perl to test things out, I do:



% cp -la ~/perl5/perlbrew/perls/perl-5.28.1-fresh_src,1
% perlbrew switch 5.28.1-fresh1


(then would later create fresh2, fresh3 and so on as needed; and when I want to throw these away I just rm -rf ~/perl5/perlbrew/perls/*fresh1 and so on.)



However, something (cpanm? EUMM?) is still confused. Scripts installed from CPAN still has the original perl path (in this case, /home/USER/perl5/perlbrew/perls/perl-5.28.1-fresh_src/bin) in their shebang line.



Any hint to the problem above, or an alternative way to quickly create a fresh throw-away perl installation is appreciated. Also, would the -l (--link) option of cp in the above command cause issue (other than perllocal.pod being appended and will contain installation records of perl installations, which is fine for me)?










share|improve this question






























    3















    I tried doing the following. First, I install a relocatable perl, e.g.:



    % perlbrew -Duserelocatableinc -j4 -n --as perl-5.28.1-fresh_src 5.28.1


    Then, whenever I need a new throw-away fresh installation of perl to test things out, I do:



    % cp -la ~/perl5/perlbrew/perls/perl-5.28.1-fresh_src,1
    % perlbrew switch 5.28.1-fresh1


    (then would later create fresh2, fresh3 and so on as needed; and when I want to throw these away I just rm -rf ~/perl5/perlbrew/perls/*fresh1 and so on.)



    However, something (cpanm? EUMM?) is still confused. Scripts installed from CPAN still has the original perl path (in this case, /home/USER/perl5/perlbrew/perls/perl-5.28.1-fresh_src/bin) in their shebang line.



    Any hint to the problem above, or an alternative way to quickly create a fresh throw-away perl installation is appreciated. Also, would the -l (--link) option of cp in the above command cause issue (other than perllocal.pod being appended and will contain installation records of perl installations, which is fine for me)?










    share|improve this question


























      3












      3








      3








      I tried doing the following. First, I install a relocatable perl, e.g.:



      % perlbrew -Duserelocatableinc -j4 -n --as perl-5.28.1-fresh_src 5.28.1


      Then, whenever I need a new throw-away fresh installation of perl to test things out, I do:



      % cp -la ~/perl5/perlbrew/perls/perl-5.28.1-fresh_src,1
      % perlbrew switch 5.28.1-fresh1


      (then would later create fresh2, fresh3 and so on as needed; and when I want to throw these away I just rm -rf ~/perl5/perlbrew/perls/*fresh1 and so on.)



      However, something (cpanm? EUMM?) is still confused. Scripts installed from CPAN still has the original perl path (in this case, /home/USER/perl5/perlbrew/perls/perl-5.28.1-fresh_src/bin) in their shebang line.



      Any hint to the problem above, or an alternative way to quickly create a fresh throw-away perl installation is appreciated. Also, would the -l (--link) option of cp in the above command cause issue (other than perllocal.pod being appended and will contain installation records of perl installations, which is fine for me)?










      share|improve this question
















      I tried doing the following. First, I install a relocatable perl, e.g.:



      % perlbrew -Duserelocatableinc -j4 -n --as perl-5.28.1-fresh_src 5.28.1


      Then, whenever I need a new throw-away fresh installation of perl to test things out, I do:



      % cp -la ~/perl5/perlbrew/perls/perl-5.28.1-fresh_src,1
      % perlbrew switch 5.28.1-fresh1


      (then would later create fresh2, fresh3 and so on as needed; and when I want to throw these away I just rm -rf ~/perl5/perlbrew/perls/*fresh1 and so on.)



      However, something (cpanm? EUMM?) is still confused. Scripts installed from CPAN still has the original perl path (in this case, /home/USER/perl5/perlbrew/perls/perl-5.28.1-fresh_src/bin) in their shebang line.



      Any hint to the problem above, or an alternative way to quickly create a fresh throw-away perl installation is appreciated. Also, would the -l (--link) option of cp in the above command cause issue (other than perllocal.pod being appended and will contain installation records of perl installations, which is fine for me)?







      perl perlbrew






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 13:20







      Perl Ancar

















      asked Mar 26 at 12:19









      Perl AncarPerl Ancar

      4559 bronze badges




      4559 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          2














          It's not quite the same, but I find docker works if I'm needing a clean install for certain testing scenarios - build up a base image and a clean perl install, fire up the container and run 'whatever'.



          You'll need root access and be able to install packages (e.g. docker) so it's not going to be suitable for every use case.



          https://buildlogs.centos.org/centos/7/docker/ has a base image you can use to build a 'clean' CentOS (or use whatever OS you prefer frankly - most have container versions)



          FROM scratch
          ADD CentOS-7-20140625-x86_64-docker_01.img.tar.xz
          LABEL name="CentOS Base Image"
          CMD ["/bin/bash"]


          In the working directory:



          docker build -t mycentos . 


          This will give you a very basic image:



          Then your perl dockerfile:



          FROM mycentos 
          COPY local.repo /etc/yum.repos.d/local.repo
          RUN yum clean all
          RUN yum install --nogpgcheck -y make gcc tar
          ADD perl-5.28.1.tar.gz /build/
          RUN cd /build/perl-5.28.1 && ./Configure -de
          RUN cd /build/perl-5.28.1 && make && make test && make install
          COPY MyConfig.pm /root/.cpan/CPAN/MyConfig.pm
          RUN cpan install Bundle::CPAN
          CMD ["/bin/bash"]


          You'll be able to spin this up, with e.g. docker run and invoke a script using /usr/local/bin/perl.



          It's not quite what you asked for, but your base image can be started and discarded as you wish - you can maintain image for a few different OS and perl combinations too.






          share|improve this answer

























          • Thanks. Not what I expected, but at least I know it's an option. BTW, how long does it typically take to create an instance?

            – Perl Ancar
            Mar 27 at 7:39






          • 1





            Once you've built the image? Seconds. docker run -it perl will get you a shell with your 'clean perl' almost instantly. You might need to copy 'whatever' you want to test into there. The build naturally is 'compiling perl' sort of timescale, so can take a while. However, Docker uses intermediate stages, so you don't need a full rebuild for every tweak. (but as a result, you should probably put the things that change least, first). Which means you can have a penultimate line of COPY script_to_test and it's still pretty quick.

            – Sobrique
            Mar 27 at 9:42












          • OK, color me intrigued. Will add a todo item to try out docker. Thanks.

            – Perl Ancar
            Mar 27 at 14:10










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55357004%2ffastest-cheapest-way-to-create-a-fresh-throw-away-installation-of-perl-using-p%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          It's not quite the same, but I find docker works if I'm needing a clean install for certain testing scenarios - build up a base image and a clean perl install, fire up the container and run 'whatever'.



          You'll need root access and be able to install packages (e.g. docker) so it's not going to be suitable for every use case.



          https://buildlogs.centos.org/centos/7/docker/ has a base image you can use to build a 'clean' CentOS (or use whatever OS you prefer frankly - most have container versions)



          FROM scratch
          ADD CentOS-7-20140625-x86_64-docker_01.img.tar.xz
          LABEL name="CentOS Base Image"
          CMD ["/bin/bash"]


          In the working directory:



          docker build -t mycentos . 


          This will give you a very basic image:



          Then your perl dockerfile:



          FROM mycentos 
          COPY local.repo /etc/yum.repos.d/local.repo
          RUN yum clean all
          RUN yum install --nogpgcheck -y make gcc tar
          ADD perl-5.28.1.tar.gz /build/
          RUN cd /build/perl-5.28.1 && ./Configure -de
          RUN cd /build/perl-5.28.1 && make && make test && make install
          COPY MyConfig.pm /root/.cpan/CPAN/MyConfig.pm
          RUN cpan install Bundle::CPAN
          CMD ["/bin/bash"]


          You'll be able to spin this up, with e.g. docker run and invoke a script using /usr/local/bin/perl.



          It's not quite what you asked for, but your base image can be started and discarded as you wish - you can maintain image for a few different OS and perl combinations too.






          share|improve this answer

























          • Thanks. Not what I expected, but at least I know it's an option. BTW, how long does it typically take to create an instance?

            – Perl Ancar
            Mar 27 at 7:39






          • 1





            Once you've built the image? Seconds. docker run -it perl will get you a shell with your 'clean perl' almost instantly. You might need to copy 'whatever' you want to test into there. The build naturally is 'compiling perl' sort of timescale, so can take a while. However, Docker uses intermediate stages, so you don't need a full rebuild for every tweak. (but as a result, you should probably put the things that change least, first). Which means you can have a penultimate line of COPY script_to_test and it's still pretty quick.

            – Sobrique
            Mar 27 at 9:42












          • OK, color me intrigued. Will add a todo item to try out docker. Thanks.

            – Perl Ancar
            Mar 27 at 14:10















          2














          It's not quite the same, but I find docker works if I'm needing a clean install for certain testing scenarios - build up a base image and a clean perl install, fire up the container and run 'whatever'.



          You'll need root access and be able to install packages (e.g. docker) so it's not going to be suitable for every use case.



          https://buildlogs.centos.org/centos/7/docker/ has a base image you can use to build a 'clean' CentOS (or use whatever OS you prefer frankly - most have container versions)



          FROM scratch
          ADD CentOS-7-20140625-x86_64-docker_01.img.tar.xz
          LABEL name="CentOS Base Image"
          CMD ["/bin/bash"]


          In the working directory:



          docker build -t mycentos . 


          This will give you a very basic image:



          Then your perl dockerfile:



          FROM mycentos 
          COPY local.repo /etc/yum.repos.d/local.repo
          RUN yum clean all
          RUN yum install --nogpgcheck -y make gcc tar
          ADD perl-5.28.1.tar.gz /build/
          RUN cd /build/perl-5.28.1 && ./Configure -de
          RUN cd /build/perl-5.28.1 && make && make test && make install
          COPY MyConfig.pm /root/.cpan/CPAN/MyConfig.pm
          RUN cpan install Bundle::CPAN
          CMD ["/bin/bash"]


          You'll be able to spin this up, with e.g. docker run and invoke a script using /usr/local/bin/perl.



          It's not quite what you asked for, but your base image can be started and discarded as you wish - you can maintain image for a few different OS and perl combinations too.






          share|improve this answer

























          • Thanks. Not what I expected, but at least I know it's an option. BTW, how long does it typically take to create an instance?

            – Perl Ancar
            Mar 27 at 7:39






          • 1





            Once you've built the image? Seconds. docker run -it perl will get you a shell with your 'clean perl' almost instantly. You might need to copy 'whatever' you want to test into there. The build naturally is 'compiling perl' sort of timescale, so can take a while. However, Docker uses intermediate stages, so you don't need a full rebuild for every tweak. (but as a result, you should probably put the things that change least, first). Which means you can have a penultimate line of COPY script_to_test and it's still pretty quick.

            – Sobrique
            Mar 27 at 9:42












          • OK, color me intrigued. Will add a todo item to try out docker. Thanks.

            – Perl Ancar
            Mar 27 at 14:10













          2












          2








          2







          It's not quite the same, but I find docker works if I'm needing a clean install for certain testing scenarios - build up a base image and a clean perl install, fire up the container and run 'whatever'.



          You'll need root access and be able to install packages (e.g. docker) so it's not going to be suitable for every use case.



          https://buildlogs.centos.org/centos/7/docker/ has a base image you can use to build a 'clean' CentOS (or use whatever OS you prefer frankly - most have container versions)



          FROM scratch
          ADD CentOS-7-20140625-x86_64-docker_01.img.tar.xz
          LABEL name="CentOS Base Image"
          CMD ["/bin/bash"]


          In the working directory:



          docker build -t mycentos . 


          This will give you a very basic image:



          Then your perl dockerfile:



          FROM mycentos 
          COPY local.repo /etc/yum.repos.d/local.repo
          RUN yum clean all
          RUN yum install --nogpgcheck -y make gcc tar
          ADD perl-5.28.1.tar.gz /build/
          RUN cd /build/perl-5.28.1 && ./Configure -de
          RUN cd /build/perl-5.28.1 && make && make test && make install
          COPY MyConfig.pm /root/.cpan/CPAN/MyConfig.pm
          RUN cpan install Bundle::CPAN
          CMD ["/bin/bash"]


          You'll be able to spin this up, with e.g. docker run and invoke a script using /usr/local/bin/perl.



          It's not quite what you asked for, but your base image can be started and discarded as you wish - you can maintain image for a few different OS and perl combinations too.






          share|improve this answer















          It's not quite the same, but I find docker works if I'm needing a clean install for certain testing scenarios - build up a base image and a clean perl install, fire up the container and run 'whatever'.



          You'll need root access and be able to install packages (e.g. docker) so it's not going to be suitable for every use case.



          https://buildlogs.centos.org/centos/7/docker/ has a base image you can use to build a 'clean' CentOS (or use whatever OS you prefer frankly - most have container versions)



          FROM scratch
          ADD CentOS-7-20140625-x86_64-docker_01.img.tar.xz
          LABEL name="CentOS Base Image"
          CMD ["/bin/bash"]


          In the working directory:



          docker build -t mycentos . 


          This will give you a very basic image:



          Then your perl dockerfile:



          FROM mycentos 
          COPY local.repo /etc/yum.repos.d/local.repo
          RUN yum clean all
          RUN yum install --nogpgcheck -y make gcc tar
          ADD perl-5.28.1.tar.gz /build/
          RUN cd /build/perl-5.28.1 && ./Configure -de
          RUN cd /build/perl-5.28.1 && make && make test && make install
          COPY MyConfig.pm /root/.cpan/CPAN/MyConfig.pm
          RUN cpan install Bundle::CPAN
          CMD ["/bin/bash"]


          You'll be able to spin this up, with e.g. docker run and invoke a script using /usr/local/bin/perl.



          It's not quite what you asked for, but your base image can be started and discarded as you wish - you can maintain image for a few different OS and perl combinations too.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 26 at 16:03

























          answered Mar 26 at 15:50









          SobriqueSobrique

          48.5k5 gold badges45 silver badges87 bronze badges




          48.5k5 gold badges45 silver badges87 bronze badges












          • Thanks. Not what I expected, but at least I know it's an option. BTW, how long does it typically take to create an instance?

            – Perl Ancar
            Mar 27 at 7:39






          • 1





            Once you've built the image? Seconds. docker run -it perl will get you a shell with your 'clean perl' almost instantly. You might need to copy 'whatever' you want to test into there. The build naturally is 'compiling perl' sort of timescale, so can take a while. However, Docker uses intermediate stages, so you don't need a full rebuild for every tweak. (but as a result, you should probably put the things that change least, first). Which means you can have a penultimate line of COPY script_to_test and it's still pretty quick.

            – Sobrique
            Mar 27 at 9:42












          • OK, color me intrigued. Will add a todo item to try out docker. Thanks.

            – Perl Ancar
            Mar 27 at 14:10

















          • Thanks. Not what I expected, but at least I know it's an option. BTW, how long does it typically take to create an instance?

            – Perl Ancar
            Mar 27 at 7:39






          • 1





            Once you've built the image? Seconds. docker run -it perl will get you a shell with your 'clean perl' almost instantly. You might need to copy 'whatever' you want to test into there. The build naturally is 'compiling perl' sort of timescale, so can take a while. However, Docker uses intermediate stages, so you don't need a full rebuild for every tweak. (but as a result, you should probably put the things that change least, first). Which means you can have a penultimate line of COPY script_to_test and it's still pretty quick.

            – Sobrique
            Mar 27 at 9:42












          • OK, color me intrigued. Will add a todo item to try out docker. Thanks.

            – Perl Ancar
            Mar 27 at 14:10
















          Thanks. Not what I expected, but at least I know it's an option. BTW, how long does it typically take to create an instance?

          – Perl Ancar
          Mar 27 at 7:39





          Thanks. Not what I expected, but at least I know it's an option. BTW, how long does it typically take to create an instance?

          – Perl Ancar
          Mar 27 at 7:39




          1




          1





          Once you've built the image? Seconds. docker run -it perl will get you a shell with your 'clean perl' almost instantly. You might need to copy 'whatever' you want to test into there. The build naturally is 'compiling perl' sort of timescale, so can take a while. However, Docker uses intermediate stages, so you don't need a full rebuild for every tweak. (but as a result, you should probably put the things that change least, first). Which means you can have a penultimate line of COPY script_to_test and it's still pretty quick.

          – Sobrique
          Mar 27 at 9:42






          Once you've built the image? Seconds. docker run -it perl will get you a shell with your 'clean perl' almost instantly. You might need to copy 'whatever' you want to test into there. The build naturally is 'compiling perl' sort of timescale, so can take a while. However, Docker uses intermediate stages, so you don't need a full rebuild for every tweak. (but as a result, you should probably put the things that change least, first). Which means you can have a penultimate line of COPY script_to_test and it's still pretty quick.

          – Sobrique
          Mar 27 at 9:42














          OK, color me intrigued. Will add a todo item to try out docker. Thanks.

          – Perl Ancar
          Mar 27 at 14:10





          OK, color me intrigued. Will add a todo item to try out docker. Thanks.

          – Perl Ancar
          Mar 27 at 14:10








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55357004%2ffastest-cheapest-way-to-create-a-fresh-throw-away-installation-of-perl-using-p%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript