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