r57028 - in /trunk/libsearch-xapian-perl: Changes META.yml README Xapian.pm Xapian/PositionIterator.pm Xapian/PostingIterator.pm debian/changelog t/04functions.t

olly at users.alioth.debian.org olly at users.alioth.debian.org
Wed Apr 28 04:00:59 UTC 2010


Author: olly
Date: Wed Apr 28 04:00:47 2010
New Revision: 57028

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57028
Log:
Merge and update for 1.0.20.0-1

Modified:
    trunk/libsearch-xapian-perl/Changes
    trunk/libsearch-xapian-perl/META.yml
    trunk/libsearch-xapian-perl/README
    trunk/libsearch-xapian-perl/Xapian.pm
    trunk/libsearch-xapian-perl/Xapian/PositionIterator.pm
    trunk/libsearch-xapian-perl/Xapian/PostingIterator.pm
    trunk/libsearch-xapian-perl/debian/changelog
    trunk/libsearch-xapian-perl/t/04functions.t

Modified: trunk/libsearch-xapian-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Changes?rev=57028&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Changes (original)
+++ trunk/libsearch-xapian-perl/Changes Wed Apr 28 04:00:47 2010
@@ -1,4 +1,11 @@
 Revision history for Perl extension Search::Xapian.
+
+1.0.20.0  Tue Apr 27 12:35:35 UTC 2010
+	[Changes contributed by Olly Betts]
+	- Avoid importing isa from UNIVERSAL to fix Perl 5.12 deprecation
+	  warning (Debian bug#578559).
+	- Fix testcase t/04functions.t to work with Perl compiled with
+	  -Duselongdouble (Debian bug#578558).
 
 1.0.19.0  Thu Apr 15 03:55:04 UTC 2010
 	[Changes contributed by Olly Betts]

Modified: trunk/libsearch-xapian-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/META.yml?rev=57028&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/META.yml (original)
+++ trunk/libsearch-xapian-perl/META.yml Wed Apr 28 04:00:47 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Search-Xapian
-version:             1.0.19.0
+version:             1.0.20.0
 abstract:            Perl XS frontend to the Xapian C++ search library.
 license:             ~
 author:              

Modified: trunk/libsearch-xapian-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/README?rev=57028&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/README (original)
+++ trunk/libsearch-xapian-perl/README Wed Apr 28 04:00:47 2010
@@ -1,4 +1,4 @@
-Search::Xapian version 1.0.19.0
+Search::Xapian version 1.0.20.0
 ===============================
 
 This is Search::Xapian, a Perl XS frontend to the Xapian C++ search library.

Modified: trunk/libsearch-xapian-perl/Xapian.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Xapian.pm?rev=57028&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian.pm (original)
+++ trunk/libsearch-xapian-perl/Xapian.pm Wed Apr 28 04:00:47 2010
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.0.19.0';
+our $VERSION = '1.0.20.0';
 
 use Exporter 'import';
 

Modified: trunk/libsearch-xapian-perl/Xapian/PositionIterator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Xapian/PositionIterator.pm?rev=57028&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian/PositionIterator.pm (original)
+++ trunk/libsearch-xapian-perl/Xapian/PositionIterator.pm Wed Apr 28 04:00:47 2010
@@ -4,8 +4,7 @@
 use strict;
 use warnings;
 use Carp;
-
-use UNIVERSAL qw( isa );
+use Scalar::Util 'blessed';
 
 require DynaLoader;
 
@@ -36,7 +35,7 @@
 
 sub equal() {
   my ($self, $other) = @_;
-  if( isa($other, 'Search::Xapian::PositionIterator') ) {
+  if( blessed($other) && $other->isa('Search::Xapian::PositionIterator') ) {
     $self->equal1($other);
   } else {
     ($self+0) == ($other+0);
@@ -45,7 +44,7 @@
 
 sub nequal() {
   my ($self, $other) = @_;
-  if( isa($other, 'Search::Xapian::PositionIterator') ) {
+  if( blessed($other) && $other->isa('Search::Xapian::PositionIterator') ) {
     $self->nequal1($other);
   } else {
     ($self+0) != ($other+0);

Modified: trunk/libsearch-xapian-perl/Xapian/PostingIterator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Xapian/PostingIterator.pm?rev=57028&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian/PostingIterator.pm (original)
+++ trunk/libsearch-xapian-perl/Xapian/PostingIterator.pm Wed Apr 28 04:00:47 2010
@@ -4,8 +4,7 @@
 use strict;
 use warnings;
 use Carp;
-
-use UNIVERSAL qw( isa );
+use Scalar::Util 'blessed';
 
 require DynaLoader;
 
@@ -36,7 +35,7 @@
 
 sub equal() {
   my ($self, $other) = @_;
-  if( isa($other, 'Search::Xapian::PostingIterator') ) {
+  if( blessed($other) && $other->isa('Search::Xapian::PostingIterator') ) {
     $self->equal1($other);
   } else {
     ($self+0) == ($other+0);
@@ -45,7 +44,7 @@
 
 sub nequal() {
   my ($self, $other) = @_;
-  if( isa($other, 'Search::Xapian::PostingIterator') ) {
+  if( blessed($other) && $other->isa('Search::Xapian::PostingIterator') ) {
     $self->nequal1($other);
   } else {
     ($self+0) != ($other+0);

Modified: trunk/libsearch-xapian-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/debian/changelog?rev=57028&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/debian/changelog (original)
+++ trunk/libsearch-xapian-perl/debian/changelog Wed Apr 28 04:00:47 2010
@@ -1,3 +1,13 @@
+libsearch-xapian-perl (1.0.20.0-1) unstable; urgency=low
+
+  * New upstream release
+    + Avoid importing isa from UNIVERSAL to fix Perl 5.12 deprecation
+      warning. (Closes: #578559)
+    + Fix testcase t/04functions.t to work with Perl compiled with
+      -Duselongdouble. (Closes: #578558)
+
+ -- Olly Betts <olly at survex.com>  Wed, 28 Apr 2010 03:53:29 +0000
+
 libsearch-xapian-perl (1.0.19.0-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libsearch-xapian-perl/t/04functions.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/04functions.t?rev=57028&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/04functions.t (original)
+++ trunk/libsearch-xapian-perl/t/04functions.t Wed Apr 28 04:00:47 2010
@@ -5,8 +5,9 @@
 #########################
 
 use Test::More;
-BEGIN { plan tests => 14 };
+BEGIN { plan tests => 26 };
 use Search::Xapian qw(:standard);
+use Config;
 
 ok(1); # If we made it this far, we're ok.
 
@@ -22,9 +23,26 @@
 
 ok($version eq Search::Xapian::version_string());
 
+my $ldbl = (defined($Config{uselongdouble}) &&
+	    $Config{uselongdouble} eq "define" &&
+	    $Config{doublesize} != $Config{longdblsize});
 for my $val (-9e10, -1234.56, -1, -1e-10, 0, 1e-10, 1, 2, 4, 8, 9, 9e10) {
     my $enc_val = Search::Xapian::sortable_serialise($val);
-    ok(Search::Xapian::sortable_unserialise($enc_val) == $val);
+    if ($ldbl) {
+	# Perl is configured with -Duselongdouble and long double isn't the
+	# same as double, so we may have rounded the input value slightly
+	# passing it to Xapian.
+	my $de_enc_val = Search::Xapian::sortable_unserialise($enc_val);
+	ok(abs($de_enc_val - $val) < 1e-12);
+	# But encoding and decoding the value we got back should give exactly
+	# the same value.
+	my $re_enc_val = Search::Xapian::sortable_serialise($de_enc_val);
+	ok(Search::Xapian::sortable_unserialise($re_enc_val) == $de_enc_val);
+    } else {
+	# We should get the exact same value back.
+	ok(Search::Xapian::sortable_unserialise($enc_val) == $val);
+	ok(1);
+    }
 }
 
 




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