On Friday 19 November 2010 06:14:19 Chap Harrison wrote:
> Hi folks,
> 
> The current version of Ubuntu Linux I'm using comes with Perl 5.10.1, but I
> want to install and develop under 5.12.2.  From what I've read in
> Perlmonks and Stackoverflow, it's not difficult to install a separate
> version - all it needs is its own directory.  But I'm a little unclear
> about how to leave things so that system utilities (such as system update)
> continue to find the 5.10 version, while at the same time I can run 'cpan'
> and have it use 5.12 as its context.
> 
> Perlbrew was mentioned, but it doesn't seem to be unanimously considered a
> good solution to my problem.

Where do you see people speak against perlbrew?

> 
> I figure I should leave the /usr/bin/perl symlink exactly the way it is,
> pointing to the "system" perl, 5.10.1.

That's right.

> 
> I figure I should create a /usr/bin/perl512 symlink to point to my 5.12.2
> version.

Oh no! Bad idea. Don't put two Perls under /usr. Install this perl under 
/opt/perl-5.12.2 or ~/opt/perl-5.12.2 and make it promoted in the path.

Make sure only your user and not root are seeing it in the path.

> 
> I figure I will have to begin my Perl programs with #!/usr/bin/perl512.
> 

You can also use #!/usr/bin/env perl.

> Are there considerations for my .bashrc file?  ($PATH, $PERL5LIB)
> 
> I have no idea whether 'cpan' is going to behave the way I want it to
> (leaving the 5.10 system alone, only modifying 5.12)
> 
> Can anyone suggest (or point to) a "best practice" way to handle this
> situation - i.e. managing both a "system" version and a development
> version?
> 

Try using perlbrew.

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman

<rindolf> She's a hot chick. But she smokes.
<go|dfish> She can smoke as long as she's smokin'.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to