# from Curtis Jewell
# on Friday 20 March 2009 14:46:

> 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.

One suggestion:

If you have configure_requires, your check can run at Build.PL time, so 
set $builder->notes(has_registry => 1) there.

Then, override ACTION_code() to perform a backup check if has_registry 
is false.  This is probably also a good time to actually download and 
install the external stuff.  Then call SUPER::ACTION_code().

But you want to prompt only at Build.PL time, so if configure_requires 
is unsatisfied, you might want to print the error "I can't check for 
myself without Win32API::Registry."  (Because there's a good chance 
you'll be asking them if they want to install something they already 
have -- which would be confusing.)

From your current code, this implies factoring out the variables to 
allow the check to be repeated without prompting during ./Build.

--Eric
-- 
"Beware of bugs in the above code; I have only proved it correct, not
tried it."
--Donald Knuth
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to