Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^4: How to properly use ExtUtils::MakeMaker PL_FILES attribute?by glasswalk3r (Friar) |
on May 27, 2017 at 15:16 UTC ( [id://1191368]=note: print w/replies, xml ) | Need Help?? |
1) Can't the PL file that generates the module place it in blib (creating the 'blib' directory if it's not already existent)?I tried that. The PL files (which I call build_my_module.PL from now on) is executed after the pm_to_files phase. I was able to open the related PM files, append information to it and close it, but this was too late since a copy (without the parts I need) was already put on 'blib'. I can write over there too, just will need to set right permissions, write, set read-only permissions again. But looks like a hack after all. I didn't get what the documentation says about "PL output is suppose to be used to the given parameter". Printing the output to STDOUT doesn't produce the expected results, and looking at the Makefile (which calls the script with a perl build_my_module.PL, returning data wouldn't do either. I'm explicit using open for that. 2) If the C header files are not found by default, then surely it's up to the user to make them locatable - eg by setting the relevant environment variable, or providing INC arg to Makefile.PL. There is a long discussion about this on the CPAN Testers mailing list, but from it I have the following conclusions:
Another possibility is to create a hash with the keys being the architecture and the values the related constants, but this is a hack and there is no telling when it is going to be broken.
Alceu Rodrigues de Freitas Junior --------------------------------- "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill
In Section
Seekers of Perl Wisdom
|
|