r57026 - in /branches/upstream/libsearch-xapian-perl/current: Changes META.yml README Xapian.pm Xapian/PositionIterator.pm Xapian/PostingIterator.pm t/04functions.t
olly at users.alioth.debian.org
olly at users.alioth.debian.org
Wed Apr 28 03:45:07 UTC 2010
Author: olly
Date: Wed Apr 28 03:43:12 2010
New Revision: 57026
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57026
Log:
[svn-upgrade] Integrating new upstream version, libsearch-xapian-perl (1.0.20.0)
Modified:
branches/upstream/libsearch-xapian-perl/current/Changes
branches/upstream/libsearch-xapian-perl/current/META.yml
branches/upstream/libsearch-xapian-perl/current/README
branches/upstream/libsearch-xapian-perl/current/Xapian.pm
branches/upstream/libsearch-xapian-perl/current/Xapian/PositionIterator.pm
branches/upstream/libsearch-xapian-perl/current/Xapian/PostingIterator.pm
branches/upstream/libsearch-xapian-perl/current/t/04functions.t
Modified: branches/upstream/libsearch-xapian-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/Changes?rev=57026&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/Changes (original)
+++ branches/upstream/libsearch-xapian-perl/current/Changes Wed Apr 28 03:43:12 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: branches/upstream/libsearch-xapian-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/META.yml?rev=57026&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/META.yml (original)
+++ branches/upstream/libsearch-xapian-perl/current/META.yml Wed Apr 28 03:43:12 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: branches/upstream/libsearch-xapian-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/README?rev=57026&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/README (original)
+++ branches/upstream/libsearch-xapian-perl/current/README Wed Apr 28 03:43:12 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: branches/upstream/libsearch-xapian-perl/current/Xapian.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/Xapian.pm?rev=57026&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/Xapian.pm (original)
+++ branches/upstream/libsearch-xapian-perl/current/Xapian.pm Wed Apr 28 03:43:12 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: branches/upstream/libsearch-xapian-perl/current/Xapian/PositionIterator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/Xapian/PositionIterator.pm?rev=57026&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/Xapian/PositionIterator.pm (original)
+++ branches/upstream/libsearch-xapian-perl/current/Xapian/PositionIterator.pm Wed Apr 28 03:43:12 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: branches/upstream/libsearch-xapian-perl/current/Xapian/PostingIterator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/Xapian/PostingIterator.pm?rev=57026&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/Xapian/PostingIterator.pm (original)
+++ branches/upstream/libsearch-xapian-perl/current/Xapian/PostingIterator.pm Wed Apr 28 03:43:12 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: branches/upstream/libsearch-xapian-perl/current/t/04functions.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/t/04functions.t?rev=57026&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/t/04functions.t (original)
+++ branches/upstream/libsearch-xapian-perl/current/t/04functions.t Wed Apr 28 03:43:12 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