in reply to Re: diagnostics pragma throwing a compile-time error in Cygwin-Perl
in thread diagnostics pragma throwing a compile-time error in Cygwin-Perl

kcott wrote:

I'm a long time user of Cygwin for both personal and $work tasks. I currently have (running on Win10):
ken@titan ~/tmp
$ uname -a
CYGWIN_NT-10.0-19045 titan 3.6.1-1.x86_64 2025-04-09 11:31 UTC x86_64 Cygwin

I update Cygwin weekly which typically takes just a few minutes; updating infrequently can take hours -- obviously, I'd recommend the former. The last update that I did was less than 12 hours ago and there were multiple pages of perl-* packages (this still only took some minutes).

I never use the system perl (/usr/bin/perl) except for tests such as those that follow; I do use Perlbrew which I heartily recommend.

I know perlbrew is very popular, but I have had some problems with using it - specifically the need to use local::lib. As far as I could tell the problem was that my home directory is not /home/somia but rather C:/Users/somia. I set up that way (in the shell initfiles) because I don't like having two home directories; I want easy, automatic cygwin access (without having to change dirs) to what the surrounding Windows system thinks is "home"—%USERPROFILE%, and I don't like having some config files and so on in two different places. I do buy trouble doing things this way, I must admit. BTW this is the first time I've admitted on Perlmonks, what I'm doing with HOME ;-)

I don't know why you quoted -Mdiagnostics. It seems superfluous but maybe you had a reason. I've used quoted and unquoted versions in the examples below.

It was a glitch between the keyboard and the chair. I don't know why I did it, just force of habit I suppose. Sometimes I get into a rush trying to compose nodes and writeups for various fora. Please ignore it ;-) – I'll refrain from editing the node now, so that future readers of this thread will see what we're talking about

I can't reproduce your error. I rarely use the diagnostics pragma but don't recall ever having encountered problems with this.

As you've seen, the problem was the absence of the perldiag.pod file because I'd never installed the perl_pods package in cygwin setup. Didn't know it was there (I think I did a search for perl-docs or something once long ago).

Thanks for jumping in on the thread. I always appreciate hearing from another CygwinPerl user.

Apr 19, 2025 at 18:16 UTC
  • Comment on Re^2: diagnostics pragma throwing a compile-time error in Cygwin-Perl

Replies are listed 'Best First'.
Re^3: diagnostics pragma throwing a compile-time error in Cygwin-Perl
by kcott (Archbishop) on Apr 20, 2025 at 03:14 UTC
    "... 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.

    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:

    • C:\Users\ken
    • /home/ken
      aka C:\cygwin64\home\ken
      aka /cygdrive/c/cygwin64/home/ken
    • Plus multiple archives from old machines all containing ken/ directories.

    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