Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

active perl & strawberry perl

by orange (Beadle)
on Sep 14, 2009 at 14:55 UTC ( [id://795154]=perlquestion: print w/replies, xml ) Need Help??

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

Hi
please tell me if there is something wrong in my procedure to use activestate perl and strawberry installed on the same partition:
i am using "activestate perl 510" and "strawberry perl" on the same windows xp partition, as follows:
1-rename activestate perl folder to something else such as perl510
2-Download Padre 0.41 from http://padre.perlide.org/download.html and install the Padre Standalone Plus Six on Windows. wich contains strawberry perl , and rakudo perl6 plugin.
3- if you want, upgrade from 0.41 to a recent version as explained in the download page.
4- run padre ide and tune it as explained also in that page , close it. now if you want to run activestate perl just rename the folder "strawberry" to "strawberry_bak" and rename perl510 to perl, if you want strawberry just rename perl to perl510 and rename strawberry_bak to strawberry, try typing perl -v in each case and you will see it is working and all related programming.
5- it is more practical to make a bat file to rename folders automatically for you and launch the correct perl you want.
6- and just make a copy for perl and strawberry perl in a safe place in case any mistake.,
7- the only inconvenience is that when you want to double click *.pl file when the strawberry perl is the current perl. but this is not a big problem. type perl zz.pl instead.
i am just wondering why the people in this thread:
http://szabgab.com/blog/2009/08/1249553120.html find it difficult to coexist the two perls??. just rename the folders as suitable and every thing is ok
whats your opinion.
ps: if you want to try perl6 using padri, just choose select File -> New -> perl 6 script, then insert your code in the opened page. and run it.
regards

Replies are listed 'Best First'.
Re: active perl & strawberry perl
by Corion (Patriarch) on Sep 14, 2009 at 15:05 UTC

    Personally I set up $ENV{PATH} so that it only contains either C:\strawberry\perl\bin or C:\strawberry-5.8.8\perl\bin (a renamed older directory) or C:\Program Files\Perl\bin, but the general approach of using different directories for different installations of Perl is a sane approach.

    I'm not sure why people find difficulties there, or what difficulties they encounter, but then, I presume that to most of the people writing such guides, or maintaining Padre, Windows is a foreign system and they believe that there are demons everywhere to devour them.

      We are used to daemons only. Demons and dragons frighten us :-)
Re: active perl & strawberry perl
by ikegami (Patriarch) on Sep 14, 2009 at 17:20 UTC

    Install them in separate directories. I have six versions of Perl installed on my machine, and I haven't had any problems.

    If you want to run a program using a specific build of Perl just replace

    perl foo.pl
    with
    c:\progs\perl5101\bin\perl foo.pl

    You can do that at the desktop level too. For example, you can create a shortcut called "foo.pl with Strawberry Perl" that executes "c:\perl foo.pl" and a shortcut called "foo.pl with ActivePerl 5.10.1" that executes "c:\progs\perl5101\bin\perl foo.pl".

Re: active perl & strawberry perl
by szabgab (Priest) on Sep 14, 2009 at 15:37 UTC
    I mentioned 3 potential issues with multiple perls on windows. BTW the same issues exist on Linux as well the difference is that on Linux the users are usually more aware of the PATH end the PERL5LIB env variables and are usually not using file extension association to run their scripts. (and sh-bang has its own issue)

    Constantly renaming the directories as you suggested is a solution but it means you cannot use both of them at the same time so you cannot run Padre on Strawberry while at the same time running your scripts on ActivePerl.

    The new StandAlone Padre installation will solve this issue as it will basically hide the face from the world that it is using perl. It won't add its bin directory to the bath and it will have a (probably .bat) launcher for Padre so the .pl file association will be also irrelevant to it.

    It is planned to be ready in a few months from now but with some help we might be able to move it earlier.

Re: active perl & strawberry perl
by syphilis (Archbishop) on Sep 14, 2009 at 23:01 UTC
    1-rename activestate perl folder to something else such as perl510

    No - you should have installed ActivePerl into "perl510" in the first place. Renaming the folder after installation has taken place means that some of the %Config values (in lib/Config.pm and lib/Config_heavy.pl) will be incorrect - eg perl -V:bin will report the old location of the perl/bin folder. These incorrect values generally won't stop you from running perl scripts, but they can screw things up when it comes to installing additional modules.

    I usually select the perl I want to run by running a batch script that sets the path to the appropriate perl. For ActivePerl, the batch file would contain:
    set PATH=C:\_32\ap1006\bin;%PATH%
    That way, when I invoke 'perl', it's ActivePerl that gets run, as it's the first 'perl' found in the path.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://795154]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found