From: Niko Tyni Date: Wed, 29 Apr 2009 20:02:01 +0000 (+0300) Subject: Document that XS_VERSION_BOOTCHECK may break if $VERSION is a long enough NV X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b017ed238008af06e2764e644dee23e72b0847ec;p=p5sagit%2Fp5-mst-13.2.git Document that XS_VERSION_BOOTCHECK may break if $VERSION is a long enough NV As seen in , using a long floating point number as $VERSION can make XS_VERSION_BOOTCHECK fail because of a loss of precision in the stringification: RRDs object version 1.2999070803 does not match bootstrap parameter 1.29990708 at /usr/lib/perl/5.10/DynaLoader.pm line 219. The mismatch happens in Perl_upg_version(), which converts a double value (NV) to a string with nine decimals but leaves a string value intact. Using a string as $VERSION works fine: -$VERSION=1.299907080300; +$VERSION="1.299907080300"; so recommend this in the VERSIONCHECK entry of perlxs.pod. --- diff --git a/pod/perlxs.pod b/pod/perlxs.pod index c367f4c..a6e21a3 100644 --- a/pod/perlxs.pod +++ b/pod/perlxs.pod @@ -1211,6 +1211,12 @@ To disable version checking: VERSIONCHECK: DISABLE +Note that if the version of the PM module is an NV (a floating point +number), it will be stringified with a possible loss of precision +(currently chopping to nine decimal places) so that it may not match +the version of the XS module anymore. Quoting the $VERSION declaration +to make it a string is recommended if long version numbers are used. + =head2 The PROTOTYPES: Keyword The PROTOTYPES: keyword corresponds to B's C<-prototypes> and