Re: Ending Build.PL if there are missing modules

Leon Timmermans <[email protected]> Sat, 4 Feb 2012 12:56:37 +0100
Newsgroups gmane.comp.lang.perl.modules.module-build
Message-ID <CAHhgV8giONxG=3Ja5RZ-am4u-T+ZtPfshd_tJ47S3MsS4mcaGQ@mail.gmail.com>
2012/2/4 Alberto Sim=C3=B5es <[email protected]>:
> Basically, I depend on Parse::Yapp, and I would like to call `yapp` on
> Build.PL so I can have the generated .pm file before M::B generates all i=
ts
> data dir.
>
> In fact, I can add that to inc/MyBuilder.pm, but I am afraid the generate=
d
> .pm will not be installed.
>
> But probably I am just too used to MakeMaker and M::B will work just fine=
 :)

There are two ways to do this. You can do this early enough during
build, the PL_files feature would be the most obvious way.
Alternatively you can add Parse::Yapp to configure requires (no need
to add a check for that, it will die by itself if it's missing), but
that will crap out on legacy perls without having any obvious
advantages.

Leon