# from Gabor Szabo
# on Tuesday 09 August 2011 00:11:
>So I tried
>
> configure_requires 'File::Copy::Recursive' => 0;
> require File::Copy::Recursive;
>
>but that still blows up when I run Makefile.PL
That is to be expected. Something outside of Makefile.PL (i.e. the cpan
client) needs to have read META.yml and resolved this beforehand.
>I wonder if this will work once it is packaged and when the META.yml
> has the configure_requires field already or if I need another way to
> make sure File::Copy::Recursive is installed before Makefile.PL is
> executed?
Yes, if configure_requires is in the META.yml (and the client
understands it), then those dependencies will be installed before
Makefile.PL is ever run.
You may elect to use eval and error-out with a nicer message for the
sake of users running the .PL manually or with an obsolete client. But
configure_requires is the way to make sure that an external dependency
is available before the Makefile.PL/Build.PL runs.
--Eric
--
The opinions expressed in this e-mail were randomly generated by
the computer and do not necessarily reflect the views of its owner.
--Management
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------