On Sun, Mar 11, 2012 at 2:13 PM, Michael Roberts <mich...@vivtek.com> wrote:

>  On 3/11/2012 8:41 AM, David Mertens wrote:
>
> The trick in your situation, which you may not know, if that you can have
> scripts that dynamically generates your module files at build time. Instead
> of Module.pm, you would have Module.pm.PL,.which will be run by
> ExtUtils::MakeMaker (or Module::Build). Then, if you can locate your lib at
> compile time, you could use this information to create the configuration
> options dynamically.
>
> Wow - that's exactly what I need!  Does MakeMaker just automatically run
> anything named *.PL that it finds?  That's perfect!
>

So... it's a bit tedious to find, but the documentation for
ExtUtils::MakeMaker (
http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-6.62/lib/ExtUtils/MakeMaker.pm)
states that any .PL file in the distribution's root directory will be run
(find under the PL_FILES key). Module::Build has similar functionality. :-)

David

-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

Reply via email to