in reply to Re^2: diagnostics pragma throwing a compile-time error in Cygwin-Perl
in thread diagnostics pragma throwing a compile-time error in Cygwin-Perl
"... the need to use local::lib.
I don't have local::lib installed under Cygwin -- I don't have any need for it. I checked this with a utility, perlmodver, that I wrote to provide info on installed modules -- here's an example:
ken@titan ~/tmp $ perlmodver local::lib Data::Dumper Data::Dump NOT FOUND: local::lib ---------------------------------------------------------------------- +-- Data::Dumper 2.189 in /home/ken/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0/cygwin-thre +ad-multi/Data/Dumper.pm ---------------------------------------------------------------------- +-- Data::Dump 1.25 in /home/ken/perl5/perlbrew/perls/perl-5.40.0/lib/site_perl/5.40.0/D +ata/Dump.pm ---------------------------------------------------------------------- +--
The code, if you're interested, is in the spoiler. I have copies of this on many platforms and use it frequently.
ken@titan ~/tmp $ cat `which perlmodver` #!/usr/bin/env perl use 5.014; use warnings; die "Usage: $0 module [ module ... ]\n" unless @ARGV; for my $module (@ARGV) { eval { eval "require $module;"; die if $@; my $mod_ver = eval "\$${module}::VERSION" // '$VERSION not set +'; say "$module $mod_ver"; say " in $INC{qq{$module.pm} =~ s[::][\/]gr}"; 1; } or do { say "NOT FOUND: $module"; }; say '-' x 72; }
I do require local::lib for other platforms that I use for $work; for example, see perl-local-lib, in the list of packages I need to get cpan to work properly, in the fairly recently posted Re: cpan: Terminal does not support AddHistory. [openSUSE].
"... I don't like having two home directories ..."
Same here; except I have more than two:
I don't use Win10 directly that much; however, when I'm downloading something it typically starts by suggesting a location like ken/some/path/ (i.e. chopping off the important part at the start of the pathname). This use to annoy me intensely -- after many years of usage I've become use to this and have stopped letting it bug me.
My more normal usage is to start a shell. There's no real problem here as it puts me in my Cygwin home directory:
ken@titan ~ $ pwd /home/ken
— Ken
|
|---|