r7232 - in /trunk/libscalar-number-perl: Changes META.yml debian/changelog lib/Scalar/Number.pm t/class_all.t t/class_i32_f52.t t/class_i64_f52.t t/val_cmp_i32_f52.t t/val_cmp_i64_f52.t
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Wed Sep 5 11:57:46 UTC 2007
Author: dmn
Date: Wed Sep 5 11:57:46 2007
New Revision: 7232
URL: http://svn.debian.org/wsvn/?sc=1&rev=7232
Log:
* New upstream release
Modified:
trunk/libscalar-number-perl/Changes
trunk/libscalar-number-perl/META.yml
trunk/libscalar-number-perl/debian/changelog
trunk/libscalar-number-perl/lib/Scalar/Number.pm
trunk/libscalar-number-perl/t/class_all.t
trunk/libscalar-number-perl/t/class_i32_f52.t
trunk/libscalar-number-perl/t/class_i64_f52.t
trunk/libscalar-number-perl/t/val_cmp_i32_f52.t
trunk/libscalar-number-perl/t/val_cmp_i64_f52.t
Modified: trunk/libscalar-number-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/Changes?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/Changes (original)
+++ trunk/libscalar-number-perl/Changes Wed Sep 5 11:57:46 2007
@@ -1,3 +1,11 @@
+version 0.002; 2007-09-02
+
+ * in tests, catch exceptions from sprintf("%.1f", $_), to work around a
+ "panic: frexp" problem seen on BSD
+
+ * in documentation, note fundamental problem with Perl 5.6 with wide
+ integers
+
version 0.001; 2007-02-05
* bugfix: in comparison, handle all cases of integers not representable
Modified: trunk/libscalar-number-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/META.yml?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/META.yml (original)
+++ trunk/libscalar-number-perl/META.yml Wed Sep 5 11:57:46 2007
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Scalar-Number
-version: 0.001
+version: 0.002
version_from: lib/Scalar/Number.pm
installdirs: site
requires:
@@ -9,4 +9,4 @@
Data::Integer: 0.000
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.30_01
Modified: trunk/libscalar-number-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/debian/changelog?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/debian/changelog (original)
+++ trunk/libscalar-number-perl/debian/changelog Wed Sep 5 11:57:46 2007
@@ -1,3 +1,9 @@
+libscalar-number-perl (0.002-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Damyan Ivanov <dmn at debian.org> Wed, 05 Sep 2007 14:57:19 +0300
+
libscalar-number-perl (0.001-1) unstable; urgency=low
* Initial Release (closes: #437101).
Modified: trunk/libscalar-number-perl/lib/Scalar/Number.pm
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/lib/Scalar/Number.pm?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/lib/Scalar/Number.pm (original)
+++ trunk/libscalar-number-perl/lib/Scalar/Number.pm Wed Sep 5 11:57:46 2007
@@ -46,7 +46,7 @@
);
use Data::Integer 0.000 qw(natint_bits min_natint max_natint);
-our $VERSION = "0.001";
+our $VERSION = "0.002";
use base "Exporter";
our @EXPORT_OK = qw(
@@ -327,6 +327,17 @@
=back
+=head1 BUGS
+
+In Perl 5.6, if configured with a wider-than-usual native integer type
+such that there are native integers that can't be represented exactly in
+the native floating point type, it is not always possible to distinguish
+between integer and floating point values. In order to get the full
+benefit of either type, one is expected (by the numeric semantics) to
+know which of them one is using. This module will not work, and will
+fail its test suite, on such a system. This problem is resolved by Perl
+5.8's new numeric semantics.
+
=head1 SEE ALSO
L<Data::Float>,
Modified: trunk/libscalar-number-perl/t/class_all.t
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/t/class_all.t?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/t/class_all.t (original)
+++ trunk/libscalar-number-perl/t/class_all.t Wed Sep 5 11:57:46 2007
@@ -6,10 +6,10 @@
sub check($$$) {
my($expect_natint, $expect_float, $value) = @_;
- my $desc = sprintf("status of %s (%.1f)",
- my $sval = $value, my $fval = $value);
- is !!sclnum_is_natint($value), !!$expect_natint, "integer $desc";
- is !!sclnum_is_float($value), !!$expect_float, "float $desc";
+ my $desc = eval { sprintf(" of %s (%.1f)",
+ my $sval = $value, my $fval = $value) } || "";
+ is !!sclnum_is_natint($value), !!$expect_natint, "integer status$desc";
+ is !!sclnum_is_float($value), !!$expect_float, "float status$desc";
}
if(have_signed_zero) {
Modified: trunk/libscalar-number-perl/t/class_i32_f52.t
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/t/class_i32_f52.t?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/t/class_i32_f52.t (original)
+++ trunk/libscalar-number-perl/t/class_i32_f52.t Wed Sep 5 11:57:46 2007
@@ -12,10 +12,10 @@
sub check($$$) {
my($expect_natint, $expect_float, $value) = @_;
- my $desc = sprintf("status of %s (%.1f)",
- my $sval = $value, my $fval = $value);
- is !!sclnum_is_natint($value), !!$expect_natint, "integer $desc";
- is !!sclnum_is_float($value), !!$expect_float, "float $desc";
+ my $desc = eval { sprintf(" of %s (%.1f)",
+ my $sval = $value, my $fval = $value) } || "";
+ is !!sclnum_is_natint($value), !!$expect_natint, "integer status$desc";
+ is !!sclnum_is_float($value), !!$expect_float, "float status$desc";
}
eval do { local $/; <DATA>; } or die $@;
Modified: trunk/libscalar-number-perl/t/class_i64_f52.t
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/t/class_i64_f52.t?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/t/class_i64_f52.t (original)
+++ trunk/libscalar-number-perl/t/class_i64_f52.t Wed Sep 5 11:57:46 2007
@@ -12,10 +12,10 @@
sub check($$$) {
my($expect_natint, $expect_float, $value) = @_;
- my $desc = sprintf("status of %s (%.1f)",
- my $sval = $value, my $fval = $value);
- is !!sclnum_is_natint($value), !!$expect_natint, "integer $desc";
- is !!sclnum_is_float($value), !!$expect_float, "float $desc";
+ my $desc = eval { sprintf(" of %s (%.1f)",
+ my $sval = $value, my $fval = $value) } || "";
+ is !!sclnum_is_natint($value), !!$expect_natint, "integer status$desc";
+ is !!sclnum_is_float($value), !!$expect_float, "float status$desc";
}
eval do { local $/; <DATA>; } or die $@;
Modified: trunk/libscalar-number-perl/t/val_cmp_i32_f52.t
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/t/val_cmp_i32_f52.t?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/t/val_cmp_i32_f52.t (original)
+++ trunk/libscalar-number-perl/t/val_cmp_i32_f52.t Wed Sep 5 11:57:46 2007
@@ -175,8 +175,8 @@
skip "special value not available", 1
unless defined($a) && defined($b);
is sclnum_val_cmp($a, $b), ($ia <=> $ib),
- sprintf("%s (%.1f) <=> %s (%.1f)",
- $a, $a, $b, $b);
+ eval { sprintf("%s (%.1f) <=> %s (%.1f)",
+ $a, $a, $b, $b) } || "";
}
}
Modified: trunk/libscalar-number-perl/t/val_cmp_i64_f52.t
URL: http://svn.debian.org/wsvn/trunk/libscalar-number-perl/t/val_cmp_i64_f52.t?rev=7232&op=diff
==============================================================================
--- trunk/libscalar-number-perl/t/val_cmp_i64_f52.t (original)
+++ trunk/libscalar-number-perl/t/val_cmp_i64_f52.t Wed Sep 5 11:57:46 2007
@@ -231,8 +231,8 @@
skip "special value not available", 1
unless defined($a) && defined($b);
is sclnum_val_cmp($a, $b), ($ia <=> $ib),
- sprintf("%s (%.1f) <=> %s (%.1f)",
- $a, $a, $b, $b);
+ eval { sprintf("%s (%.1f) <=> %s (%.1f)",
+ $a, $a, $b, $b) } || "";
}
}
}
More information about the Pkg-perl-cvs-commits
mailing list