[libstring-koremutake-perl] 01/01: Patch POD to mention "use bigint; " under CAVEATS (Closes: #723021)

Axel Beckert abe at deuxchevaux.org
Fri Dec 13 20:37:32 UTC 2013


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository libstring-koremutake-perl.

commit 75ea4671e0565ae1ce4adf4b3fd3170a66afeac9
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Fri Dec 13 21:36:19 2013 +0100

    Patch POD to mention "use bigint;" under CAVEATS (Closes: #723021)
---
 debian/changelog                                  |  1 +
 debian/patches/mention-bigint-under-caveats.patch | 58 +++++++++++++++++++++++
 debian/patches/series                             |  1 +
 3 files changed, 60 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ba104f8..f3a866a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,7 @@ libstring-koremutake-perl (0.30-4) UNRELEASED; urgency=low
   * Change search.cpan.org based URIs to metacpan.org based URIs
 
   [ Axel Beckert ]
+  * Patch POD to mention "use bigint;" under CAVEATS (Closes: #723021)
   * Switch to source format "3.0 (quilt)"
   * Update debian/copyright to mention the correct Perl license terms
   * Bump debhelper compatibility to 9
diff --git a/debian/patches/mention-bigint-under-caveats.patch b/debian/patches/mention-bigint-under-caveats.patch
new file mode 100644
index 0000000..80588e9
--- /dev/null
+++ b/debian/patches/mention-bigint-under-caveats.patch
@@ -0,0 +1,58 @@
+Description: Mention "use bigint;" in POD under CAVEATS
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=78653
+Bug-Debian: http://bugs.debian.org/723021
+Author: Axel Beckert <abe at debian.org>
+
+Index: libstring-koremutake-perl/lib/String/Koremutake.pm
+===================================================================
+--- libstring-koremutake-perl.orig/lib/String/Koremutake.pm	2013-08-29 16:55:22.000000000 +0200
++++ libstring-koremutake-perl/lib/String/Koremutake.pm	2013-12-13 21:31:55.000000000 +0100
+@@ -138,6 +138,48 @@
+ 
+   my $i = $k->koremutake_to_integer('koremutake'); # 10610353957
+ 
++=head1 CAVEATS
++
++You need to "use bigint;" if you want String::Koremutake to work with
++integers larger than what fits into a normal Perl integer before it
++gets converted to a floating point number on your platform.
++
++=head2 Example
++
++Without "use bigint;" big integers get converted to fixed precision
++floating point numbers:
++
++  $ perl -MString::Koremutake -le '
++    my $a = 65536**4;
++    my $k = String::Koremutake->new;
++    foreach my $b ($a, $a+1, $a+2, $a+3) {
++      print "$b: ".$k->integer_to_koremutake($b);
++    }'
++  1.84467440737096e+19: bibababababababababa
++  1.84467440737096e+19: bibababababababababa
++  1.84467440737096e+19: bibababababababababa
++  1.84467440737096e+19: bibababababababababa
++
++If you use that large integers, you should add "use bigint;" to your
++program which solves that issue:
++
++  $ perl -Mbigint -MString::Koremutake -le '
++    my $a = 65536**4;
++    my $k = String::Koremutake->new;
++    foreach my $b ($a, $a+1, $a+2, $a+3) {
++      print "$b: ".$k->integer_to_koremutake($b);
++    }'
++  18446744073709551616: bibababababababababa
++  18446744073709551617: bibababababababababe
++  18446744073709551618: bibababababababababi
++  18446744073709551619: bibababababababababo
++
++It will likely save you from other issues with big integers, too.
++
++Note that "foreach my $b ($a .. $a+3)" doesn't work either as the ".."
++operator can't be overloaded. See CAVEATS in "perldoc bigint" for
++details.
++
+ =head1 BUGS AND LIMITATIONS                                                     
+                                                                                 
+ No bugs have been reported.                                                     
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2c2c938
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+mention-bigint-under-caveats.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libstring-koremutake-perl.git



More information about the Pkg-perl-cvs-commits mailing list