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:

  1. These constants will change depending on processor architecture
  2. Best way to achieve the right header file is using the C compiler itself, since h2ph doesn't quite work (at least not in Ubuntu). So, to make it clear, I don't need the C compiler really, but I need it to grab me the correct constant value to use with syscall.

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 reply to Re^4: How to properly use ExtUtils::MakeMaker PL_FILES attribute? by glasswalk3r
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.