Skip Menu |

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 24111
Status: resolved
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: pmqs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.19
Fixed in: (no value)



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
I fixed this in a different way, but hopefully improved the error reporting and added notes to the docs what the errors mean. http://svn.goingon.net/viewvc/Scalar-List-Utils/trunk/lib/Scalar/Util.pm? r1=141&r2=140&pathrev=141