understanding effects of moving addons from site_perl to vendor_perl

Reini Urban rurban@x-ray.at
Sun Aug 29 13:41:00 GMT 2004


linda w schrieb:
> It's been a few weeks since I've used perl on my Win machine, but
> noticed an error message about inability to find Win32.pm in my path
> just for starting up perl.
> 
> It turned out in my env, I had one of the lib dirs set to 
> /usr/local/lib/perl/5.8
> and had it autoloading (not quite sure why at this point) the Win32.pm 
> module
> with "PERL5OPT=-MWin32".

Would be interesting to know which braindamaged app/installer did this 
do you.

> Looking for Win32.pm, I find 3 copies and a 4th name-related copy:
> 
> /lib/perl5/5.8.5/ExtUtils/MM_Win32.pm
> /lib/perl5/5.8.5/File/Spec/Win32.pm
> /lib/perl5/site_perl/5.8.2/cygwin-thread-multi-64int/Win32.pm
> /usr/local/lib/perl/5.8/URI/file/Win32.pm

These have nothing to do with the perl-5.8.5 Win32 module.
As you see with "site_perl" line above, Win32 is a custom module, which 
wasn't installed with perl standard distribution.
Well, there is a seperate old perl-libwin32 package which did that for 
you. but this package is only for 5.8.2 and was not updated so far to 
5.8.5 (HINT: just a postinstall.sh fix would be sufficient)
The other lines have nothing to do with Win32.

> Assuming I wanted to have the same autoload procedure in effect working,
> what directory should be included?

The default ones. But not /usr/local/lib/perl/5.8. Only if know what you 
should do, what you obviously don't do.

> One problem I see on my system seems to be that the perl distro's INC
> path doesn't seem to include the 5.8.2 version files:

yes, because it's the 5.8.5 version. you can however include the four 
needed old 5.8.2 paths (with and without site_perl, with and without 
cygwin-thread-multi-64int), but I would recommend upgrading all your 
site_perl libs.
CPAN autobundle will come to help here, as already said here last week.
It will help you taking a snapshot of your 5.8.2 modules and install 
them again in 5.8.5.

> Can't locate Win32.pm in @INC (@INC contains: 
> /usr/lib/perl5/5.8.5/cygwin-thread
> -multi-64int /usr/lib/perl5/5.8.5 
> /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-m
> ulti-64int /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl 
> /usr/lib/perl
> 5/vendor_perl/5.8.5/cygwin-thread-multi-64int 
> /usr/lib/perl5/vendor_perl/5.8.5 /
> usr/lib/perl5/vendor_perl .).
> BEGIN failed--compilation aborted.

Sure, because you haven't installed Win32 yet.

$ cpan Win32

> Shouldn't the perl library and perl interpreter be at the same version?

yes. but here 5.8.2 to 5.8.5 are binary compatible. you it would be 
possible to add the 5.8.2 paths also.

The problem is that if you set PERL5LIB="<5.8.2-paths>" it will be 
prepended to @INC, which will prefer 5.8.2 over 5.8.5, which makes it 
effectively impossible to upgrade your modules! They will not be loaded, 
just the 5.8.2 versions instead.

> Is this a mistake or is the library "behind" the interpreter?  I didn't
> choose "experimental" releases, so I would have expected stuff in the main
> line to work together, is this just happenstance?

There is no mistake. just install Win32. perl did not find it.

PS:
this will re-install all your old site_perl:

# catch the old libs (new will be ignored)
perl -MCPAN 
-Mlib=/usr/lib/perl/site_perl/5.8.2,/usr/lib/perl/site_perl/5.8.2/cygwin-thread-multi-64int 
  -e autobundle

# inspect the generated snapshot and run the line after SYNOPSIS
grep "perl -MCPAN" ~/.cpan/Bundle/Snapshot_2004_08_29_00.pm

=> perl -MCPAN -e 'install Bundle::Snapshot_2004_08_29_00'

-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list