If I could rely on h2ph, yes, but I can't. Linux distributions have a variation of locations there they think it the best way to keep C header files. On the other hand, they don't distribute broken C libraries, so it is safe to assume I can use it to get the constant.

Um, no, thats not what I'm talking about. Header files are created by humans, they're source code. In big projects, like gui libraries, mfc, wxwidgets, header numbers do not change ever, for 5/10/15/20 years and more. New headers get added. Old numbers do not change.

I'm not suggesting you use h2ph , I'm suggesting you use your eyes, track down every copy of the header file that ever existed, like in some kind of git repository, and compare the number today to the number it was 50 years ago

Do it for all "official" source code repository that manages this header file

Its like, you're not compiling/interfacing any c/xs code -- headers are just #define ... that stuff doesn't change :)

That will probably give me a maintenance headache: we just need a new processor coming up or anything else that justify changing that constant.

Hehe, um, no, that is not a maintenance headache, you just keep doing exactly what you're doing right this moment, except instead of Inline ... in Makefile.PL, only so you can insert sub CONSTANT(){12} into Foo.pm, all you do is have Foo.pm read from foo-dist/constant.txt when its loaded

Its like h2ph, you require "constants.ph" or whatever, you don't inline the source of constants.ph into your module.pm

Its like how much time you want to spend figuring out your makemaker for a single solitary constant


In reply to Re^5: How to properly use ExtUtils::MakeMaker PL_FILES attribute? by Anonymous Monk
in thread How to properly use ExtUtils::MakeMaker PL_FILES attribute? by glasswalk3r

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.