Re: How to upgrade perl standard module?




Sisyphus wrote:
> "Tanel Kokk" <tanel.kokk.remove.it@xxxxxxx>
>
> >
> > Mh.. I tried to make an rpm from newer cpan module (with perl2rpm). When
> > I installed it, it was installed into directory
> > /usr/lib/perl5/vendor_perl/5.8.3/*, while original module is in
> > directory /usr/lib/perl5/5.8.3/*. So there wouldn't be any rpm conflicts
> > (except man pages files, but these ones are not important)
>
> Normally you'd update by using either method 1) or 2) from your first post,
> instead of creating and installing an RPM. If you did that you might find
> (I'm not sure) that the new version gets installed in
> /usr/lib/perl5/5/8/3, overwriting the old version (2.21).
>
> I don't understand why you don't want to do that - but that could be bad
> understanding on *my* part as I've never had much to do with RPM's as
> regards perl.

What if SuSE releases new perl rpm package, which for example fixes
some perl core bugs. Then my upgraded module MIME::Base64 will be
downgraded and I have to upgrade module again.

>
> >
> > Then I tested, which module perl program will use:
> > $ perl -MMIME::Base64 -e 'print $MIME::Base64::VERSION'
> >
> > I got "2.21". So perl will use older module. Why?
>
> Because that's the version it finds first. Perl goes looking through the
> @INC directories, and uses the first MIME::Base64 it comes across.
> If you print out the contents of @INC, you should find that
> /usr/lib/perl5/5.8.3 is listed ahead of /usr/lib/perl5/vendor_perl/5.8.3.

I remember "from somewhere", that if perl use the latest version on
module. But it could be just my misunderstanding.

>
> >
> > What does these directory structures mean - site_perl and vendor_perl?
> >
>
> There are conventions regarding just which @INC folder the various modules
> go into. I'm not exactly sure of the rules that govern those conventions on
> Unix type operating systems - someone else might provide them. As regards
> functionality, it doesn't really matter whether a module gets installed into
> perl5/5.8.3 or perl5/vendor_perl/5.8.3 or perl5/site_perl/5.8.3 or any other
> @INC directory. As just explained it can have a bearing on which version of
> a module gets found first, but the functionality of a module is not
> dependent upon being in any *particular* @INC directory.
>
> My feeling is that you could also solve your problem by removing the older
> version of MIME::Base64. (Just rename Base64.pm to Base64.pm_bak - and
> change it back to Base64.pm if you find you ever need to. No guarantees with
> that - I personally get a bit nervous messing with installations that the
> operating system uses.) Better still would be to build your own perl in
> usr/local/lib, that you can mess with as you like without having to worry
> about screwing up your operating system.

As I said I wouldn't want to change files, which belongs to perl rpm's.
I think I resolve problem in that way:
- I'll make an personal rpm from new MIME::Base64 module with
PREFIX=/usr/local parameter
- I'll install it into /usr/local direcory structure
- and I'll use -I option to include /usr/local directory, when I'm
running perl program. With -I option directory will be in first place
in @INC array.


Thanks everybody!

Tanel

.



Relevant Pages

  • ANNOUNCE: UnixODBC 0.31
    ... UnixODBC provides a toolkit for writing Perl ODBC clients. ... - Installing and Configuring the Bridge Server ... UnixODBC.pm provides Perl programs with a subset of the X/Open ... Bridge Server," below. ...
    (comp.lang.perl.modules)
  • Re: Unix commands
    ... might have a problem or two with installing some CPAN modules as well. ... Skilled programmers are able to see the ... Then their problem already starts with using Perl on Windows (for ... Most external tools have switches that enable / disable features. ...
    (comp.lang.perl.misc)
  • Source Code Control and Naming ThingiePoo was Re: Starting Perl
    ... > I need to fix them). ... why not treat your 'perl code' like as if it were RealCode? ... Makefile.PL that will simplify installing the Perl Module in the ...
    (perl.beginners)
  • Re: Win32::TieRegistry problem
    ... Not only am I limited by the perl ... >> installing a CPAN module is not allowed by my client (meaning the ... >> writing is a script to verify the installation of Rational Clearcase ...
    (comp.lang.perl.modules)
  • Re: Installing DBI
    ... Perl is working great. ... had no problem installing PERL on my own windows laptop. ... I would double check your download, your copy, and your gunzip before ...
    (perl.beginners)