Just another Perl shrine | |
PerlMonks |
Re^5: How to properly use ExtUtils::MakeMaker PL_FILES attribute?by Anonymous Monk |
on Jun 04, 2017 at 08:29 UTC ( [id://1192111]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|