Re: How to upgrade perl standard module?
- From: "tanelko" <tanel.kokk@xxxxxxx>
- Date: 23 Aug 2005 06:33:02 -0700
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
.
- Follow-Ups:
- Re: How to upgrade perl standard module?
- From: tanelko
- Re: How to upgrade perl standard module?
- References:
- How to upgrade perl standard module?
- From: Tanel Kokk
- Re: How to upgrade perl standard module?
- From: Scott W Gifford
- Re: How to upgrade perl standard module?
- From: Tanel Kokk
- Re: How to upgrade perl standard module?
- From: Sisyphus
- How to upgrade perl standard module?
- Prev by Date: Re: Apache2::Cookie
- Next by Date: Re: How to upgrade perl standard module?
- Previous by thread: Re: How to upgrade perl standard module?
- Next by thread: Re: How to upgrade perl standard module?
- Index(es):
Relevant Pages
|
|