upgrading modules perl 5.8.8 -> 5.10.0

Discussion in 'Perl Misc' started by Michael Friendly, Mar 27, 2009.

  1. [Running debian linux]
    As part of a routine upgrade of some of my software, apt insisted on
    upgrading perl from 5..8.8 to 5.10.0.

    I had many CPAN modules installed, under
    /usr/local/lib/perl/5.8.8/
    /usr/local/share/perl/5.8.8/

    and now, of course, my scripts that try to USE them fail. Is there some
    simple way to install them so they will work with 5.10.0 without having
    to go through the list one by one? Is there something like the perl
    package manager for linux?

    -Michael
     
    Michael Friendly, Mar 27, 2009
    #1
    1. Advertising

  2. Michael Friendly wrote:
    > [Running debian linux]
    > As part of a routine upgrade of some of my software, apt insisted on
    > upgrading perl from 5..8.8 to 5.10.0.
    >
    > I had many CPAN modules installed, under
    > /usr/local/lib/perl/5.8.8/
    > /usr/local/share/perl/5.8.8/
    >
    > and now, of course, my scripts that try to USE them fail.


    That's not apparent to me out from your description. Paths containing
    pure Perl modules typically should work under 5.10.0 as well. Of course,
    you have to make sure that your 5.10.0 perl finds them.

    The best way to do that is to install 5.10.0 so that 5.8.8 paths to pure
    Perl modules are included in @INC. Try this link for further guidance on
    the topic:
    http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_earlier_versions_of_perl_5

    Otherwise you may want to play with the PERL5LIB environment variable or
    the lib pragma.

    Modules that need to be pre-compiled, OTOH, you will probably need to
    reinstall.

    HTH

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Mar 27, 2009
    #2
    1. Advertising

  3. Michael Friendly

    Guest

    On Mar 27, 6:04 pm, Gunnar Hjalmarsson <> wrote:
    > The best way to do that is to install 5.10.0 so that 5.8.8 paths to pure
    > Perl modules are included in @INC. Try this link for further guidance on
    > the topic:http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_...
    >
    > Otherwise you may want to play with the PERL5LIB environment variable or
    > the lib pragma.
    >

    Thanks for the reply.

    OK, setting PERL5LIB seems like the easiest way for non-compiled
    modules.
    How could I find the 5.8.8 modules I have which *are* compiled?

    -Michael
     
    , Mar 28, 2009
    #3
  4. Gunnar Hjalmarsson wrote:
    > Michael Friendly wrote:
    >> [Running debian linux]
    >> As part of a routine upgrade of some of my software, apt insisted on
    >> upgrading perl from 5..8.8 to 5.10.0.
    >>
    >> I had many CPAN modules installed, under
    >> /usr/local/lib/perl/5.8.8/
    >> /usr/local/share/perl/5.8.8/
    >>
    >> and now, of course, my scripts that try to USE them fail.

    >
    > That's not apparent to me out from your description. Paths containing
    > pure Perl modules typically should work under 5.10.0 as well. Of course,
    > you have to make sure that your 5.10.0 perl finds them.
    >
    > The best way to do that is to install 5.10.0 so that 5.8.8 paths to pure
    > Perl modules are included in @INC. Try this link for further guidance on
    > the topic:
    > http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_earlier_versions_of_perl_5


    Is there any way to append my previous 5.8.8 paths to @INC without
    recompiling perl or modifying my script files. That would be the
    cleanest solution. Then I could update any modules in 5.10.0 I
    needed using the cpan tool and the updated versions would be found
    first. Alternatively, something like
    cpan upgrade
    where it looks in my 5.8.8 libraries and upgrades these to 5.10.0

    As a temporary measure, I modified PERL5LIB,
    PERL5LIB=/home/friendly/lib/perl:/usr/local/share/perl/5.8.8/:/usr/local/lib/perl/5.8.8/

    but I realized this means that anything under 5.8.8 would take
    precedence over anything newer in 5.10.0


    >
    > Otherwise you may want to play with the PERL5LIB environment variable or
    > the lib pragma.



    --
    Michael Friendly Email:
    Professor, Psychology Dept.
    York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
    4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
    Toronto, ONT M3J 1P3 CANADA
     
    Michael Friendly, Mar 30, 2009
    #4
  5. Michael Friendly wrote:
    > Gunnar Hjalmarsson wrote:
    >> Michael Friendly wrote:
    >>> [Running debian linux]
    >>> As part of a routine upgrade of some of my software, apt insisted on
    >>> upgrading perl from 5..8.8 to 5.10.0.
    >>>
    >>> I had many CPAN modules installed, under
    >>> /usr/local/lib/perl/5.8.8/
    >>> /usr/local/share/perl/5.8.8/
    >>>
    >>> and now, of course, my scripts that try to USE them fail.

    >>
    >> That's not apparent to me out from your description. Paths containing
    >> pure Perl modules typically should work under 5.10.0 as well. Of
    >> course, you have to make sure that your 5.10.0 perl finds them.
    >>
    >> The best way to do that is to install 5.10.0 so that 5.8.8 paths to
    >> pure Perl modules are included in @INC. Try this link for further
    >> guidance on the topic:
    >> http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_earlier_versions_of_perl_5

    >
    > Is there any way to append my previous 5.8.8 paths to @INC without
    > recompiling perl or modifying my script files. That would be the
    > cleanest solution. Then I could update any modules in 5.10.0 I
    > needed using the cpan tool and the updated versions would be found
    > first. Alternatively, something like
    > cpan upgrade
    > where it looks in my 5.8.8 libraries and upgrades these to 5.10.0
    >
    > As a temporary measure, I modified PERL5LIB,
    > PERL5LIB=/home/friendly/lib/perl:/usr/local/share/perl/5.8.8/:/usr/local/lib/perl/5.8.8/
    >
    > but I realized this means that anything under 5.8.8 would take
    > precedence over anything newer in 5.10.0


    Right. So, to summarize, you don't want to
    - recompile perl
    - modify the script files
    - make older modules take precedence over modules installed in 5.10.0

    Well, that equation is over my head. ;-)

    If you are ready to give up your wish to not change the script files,
    you can use push() to append paths to @INC:

    BEGIN {
    push @INC, qw(
    /home/friendly/lib/perl
    /usr/local/share/perl/5.8.8/
    /usr/local/lib/perl/5.8.8/
    );
    }

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Mar 30, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. v0idnull
    Replies:
    1
    Views:
    389
    Jim Gibson
    Dec 27, 2004
  2. Brian Elmegaard

    Upgrading and modules

    Brian Elmegaard, Apr 14, 2006, in forum: Python
    Replies:
    4
    Views:
    267
    Brian Elmegaard
    Apr 18, 2006
  3. Astan Chee

    upgrading python (and other modules)

    Astan Chee, Mar 29, 2007, in forum: Python
    Replies:
    0
    Views:
    252
    Astan Chee
    Mar 29, 2007
  4. Astan Chee
    Replies:
    1
    Views:
    328
  5. Brian Salter-Duke

    Upgrading perl and module use

    Brian Salter-Duke, Nov 7, 2003, in forum: Perl Misc
    Replies:
    5
    Views:
    105
    Brian Salter-Duke
    Nov 9, 2003
Loading...

Share This Page