Yes you can, thats what META files are for, you simply tell writemakefile the depends, when you make dist METAL files are generated, then when user try to install cpan/cpanp/cpanm notice from metal files what the "BUILD_REQUIRES" ...

Not sure if this would work, specially because the distribution already generates the mentioned files (see here). Check out this test result too. I made a stupid mistake when trying to avoid calling Inline at each call, I just need to execute it once and write the constant elsewhere. But doing that inside the Makefile.PL is not an option... I could have used require inside a eval block to trap the exception, but then the module wouldn't be created anyway. The cpan client will search and install dependencies right after the Makefile.PL is executed, but then it is too late to use it for the code generation.

A ".PL" file (as described by ExtUtils::MakeMaker) would be the best option, if I could control when it will be executed...

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.