in reply to Re^16: supporting quads on 32 bit Perl
in thread supporting quads on 32 bit Perl
use strict; use warnings; use Math::Int64 qw( hex_to_int64 ); use Test::More; my $normalnum = 0; is($normalnum, hex_to_int64("0x8000200030004000"), "some test");
which was called fromsub _unoverload { my $self = shift; my $type = shift; $self->_try(sub { require overload; }, die_on_fail => 1); foreach my $thing (@_) { if( $self->_is_object($$thing) ) { if( my $string_meth = overload::Method( $$thing, $type ) ) + { >>>>>>>>>>>>>>> $$thing = $$thing->$string_meth(); } } } return; }
which was called from Test::Builder::cmp_ok which was called from Test::Builder::is_eq which was called from Test::More::is. When I put a breakpoint right before Int64's _string XSUB is called in _unoverload, the command line sayssub _unoverload_str { my $self = shift; return $self->_unoverload( q[""], @_ ); }
If I run the whole script the output is# Failed test 'some test' not ok 1 - some test # at C:\Documents and Settings\Owner\Desktop\n13.pl line 7.
In XS, in Math::Int64::_string, from Test::Builder::_unoverload, items variable was 1. That will cause the croak obviously.C:\Documents and Settings\Owner\Desktop>perl n13.pl not ok 1 - some test # Failed test 'some test' # at n13.pl line 7. Usage: Math::Int64::_string(self, other, rev) at C:/perl512/lib/Test/B +uilder.pm line 876. # Tests were run but no plan was declared and done_testing() was not s +een. C:\Documents and Settings\Owner\Desktop>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^18: supporting quads on 32 bit Perl
by salva (Canon) on Jun 04, 2012 at 10:22 UTC | |
by bulk88 (Priest) on Jun 04, 2012 at 13:57 UTC | |
by salva (Canon) on Jun 04, 2012 at 14:45 UTC | |
by bulk88 (Priest) on Jun 04, 2012 at 17:44 UTC | |
by salva (Canon) on Jun 04, 2012 at 21:33 UTC | |
|