#!/usr/bin/perl -w
blib_load(
'Module::Build'
);
my
$tmp
= MBTest->tmpdir;
my
$dist
= DistGen->new(
dir
=>
$tmp
);
$dist
->regen;
$dist
->chdir_in;
my
$mb
; stdout_of(
sub
{
$mb
= Module::Build->new_from_context});
blib_load(
'Module::Build::Compat'
);
$dist
->regen;
stdout_stderr_of(
sub
{ Module::Build::Compat->create_makefile_pl(
'passthrough'
,
$mb
); }
);
$dist
->change_file(
'Build.PL'
=>
"warn qq(you have no libthbbt\n); exit;\n"
.
$dist
->get_file(
'Build.PL'
)
);
$dist
->regen;
stdout_of(
sub
{
$mb
->ACTION_realclean });
my
$result
;
my
(
$stdout
,
$stderr
) = stdout_stderr_of (
sub
{
$result
=
$mb
->run_perl_script(
'Makefile.PL'
);
});
ok
$result
,
"Makefile.PL exit"
;
like
$stdout
,
qr/running Build\.PL/
;
like
$stderr
,
qr/you have no libthbbt$/
;