Re: Problem installing IO::Compress::Base



On Sep 30, 4:10 am, John Oliver <joli...@xxxxxxxxxxxxxxx> wrote:
but no explanations of how
to determine whether or not you're installing an "XS" version of
Scalar::Util

Yes - I didn't spot any such explanation.

At the beginning of the Scalar-List-Utils Makefile.PL you'll find:

my $do_xs = can_cc();

where 'can_cc' is a Module::Install sub. The return of 'can_cc'
determines whether it's an XS build or a pure perl build.

The IO::Compress::Base test file (01misc.t) determines whether you
have the XS or pure perl version of Scalar::Util by calling the
CompTestUtils.pm subroutine 'gotScalarUtilXS' which looks like:

sub gotScalarUtilXS
{
eval ' use Scalar::Util "dualvar" ';
return $@ ? 0 : 1 ;
}

Apparently, 'dualvar' is available only with the xs build.
(CompTestUtils.pm is part of the IO::Compress::Base source.)

Cheers,
Rob

.