Curtis Jewell wrote:
> As in between "perl Build.PL" and "Build test"?
> 
> I assume there's not a sub ACTION_ to override!

ACTION_build, strangely enough, which depends on ACTION_code and ACTION_docs.


> Here's what I need to do: I'm writing an Alien:: module that needs to
> check the Windows registry to see if the software I'm trying to
> installed is already installed.  I have a configure_requires on
> Win32API::Registry 0.30 for the systems that support configure_requires,
> but for those that don't, I want to delay checking for my software until
> after prerequisites are checked and Win32API::Registry installed.
> 
> (Of course, the first thing I do after all the use statements is "die
> 'OS unsupported' if ('MSWin32' ne $OSNAME);" so that's not a worry.)
> 
> 1) Can I do it late in my Build PL (i.e. after or during
> "$builder->create_build_script();") [which I assume is what I'm supposed
> to do if I can] 
> or do I have to override the "Build" stage somehow?

I'd just do it in the Build.PL.  If the system supports configure_requires it
will already have it installed.  If it doesn't, then it will fail.

I don't think OS Unsupported is the correct response.  The OS isn't
unsupported, the user is just missing a prereq.  I'd do something like this:

eval { require Win32API::Registry }
    or die "Can't build without Win32API::Registry";

I don't think there's a standard way to say "you're missing a module I need in
the configure stage" other than configure_requires.


> 2) Based on that answer, what do I override?

Is Win32API::Registry really necessary to run Build.PL?  Is it only necessary
as part of the build process?  Do you need it at run time?


-- 
If you want the truth to stand clear before you, never be for or against.
The struggle between "for" and "against" is the mind's worst disease.
    -- Sent-ts'an

Reply via email to