As usual, this is about Someone Else's Code. Not in a blamey way, just that it seems to be my thing to trip over odd cases and bring them out for scrutiny by the good monks. Today I was successful in installing a module published by our good monk cavac, the CPAN module Array::Contains to a Gnu/Linux system, then a few minutes later I went to install it to my cygwin perl setup. I get an error that takes some scrunching up of one's eyes to figure out.

Simplest test case is a one-liner:

$ perl '-Mdiagnostics' -le 'print $diagnostics::VERSION' couldn't find diagnostic data in /usr/share/perl5/5.40/pods/perldiag.p +od /usr/share/perl5 /usr/local/lib/perl5/site_perl/5.40/x86_64-cygwin +-threads /usr/local/share/perl5/site_perl/5.40 /usr/lib/perl5/vendor_ +perl/5.40/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.40 /us +r/lib/perl5/5.40/x86_64-cygwin-threads /usr/share/perl5/5.40 -e at /u +sr/share/perl5/5.40/diagnostics.pm line 259, <POD_DIAG> line 718. Compilation failed in require. BEGIN failed--compilation aborted.

The first 10 lines of Array::Contains are:

package Array::Contains; use 5.010_001; use strict; use warnings; use diagnostics; use mro 'c3'; use English; our $VERSION = 2.8; use Carp;

I don't see many modules that use diagnostics so this hasn't come up before for me.

Apr 16, 2025 at 02:05 UTC

A just machine to make big decisions
Programmed by fellows (and gals) with compassion and vision
We'll be clean when their work is done
We'll be eternally free yes, and eternally young
Donald Fagen —> I.G.Y.
(Slightly modified for inclusiveness)


In reply to diagnostics pragma throwing a compile-time error in Cygwin-Perl by Intrepid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.