Skip Menu |

This queue is for tickets about the Convert-Binary-C CPAN distribution.

Report information
The Basics
Id: 69268
Status: open
Priority: 0/
Queue: Convert-Binary-C

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

Bug Information
Severity: Unimportant
Broken in: 0.76
Fixed in: (no value)



Subject: Problems with bignums
Using the module together with bigint or bignum in the following script use Convert::Binary::C; use bigint; Convert::Binary::C->new(IntSize => 4); causes new() to die with IntSize must be an integer value, not a reference at test.pl line 3. I don't know, if it's necessary to check whether a value is a SV (Perl guts are mostly magic to me), but it would be nice to avoid such surprises when possible.
On Mon Jul 04 09:47:00 2011, PWES wrote: Show quoted text
> Using the module together with bigint or bignum in the following
script Show quoted text
> > use Convert::Binary::C; > use bigint; > Convert::Binary::C->new(IntSize => 4); > > causes new() to die with > > IntSize must be an integer value, not a reference at test.pl line 3. > > I don't know, if it's necessary to check whether a value is a SV (Perl > guts are mostly magic to me), but it would be nice to avoid such > surprises when possible.
Oh, you're very right, that shouldn't happen. The checks aren't really necessary, but they usually avoid surprises. In cases like yours, they seem to do the exact opposite, but that's not true: They rather uncover a bug in the implementation. And "magic" is exactly what this is all about. The option handling code apparently doesn't handle "magic" that is attached to bigint/bignum objects and thus sees them as a reference. I'll have a look at fixing this asap (shouldn't be too difficult), but it might take a few days until I'm back at my dev machine. Thanks for the report! Marcus