Hi Graham,
someone reported a problem with my Compress::Zlib module earlier today.
The error looked like this
# Error: is only avaliable with the XS version
at /Users/dha/Compress-Zlib-2.001/blib/lib/Compress/Zlib.pm line 9
This is line 9 in Zlib.pm
use Scalar::Util qw(dualvar);
Obviously they didn't have a C compiler availale when they built your
module but the error message you are outputting seemed strange, so I
had a look at your code
if (grep { /^(dualvar|set_prototype)$/ } @_ ) {
require Carp;
Carp::croak("$1 is only avaliable with the XS version");
}
The problem is that $1 gets trashed by the "grep". Something like this
should sort it out.
foreach (@_) {
if ( /^(dualvar|set_prototype)$/ ) {
require Carp;
Carp::croak("$1is only avaliable with the XS version");
}
}
cheers
Paul