r23374 - in /branches/upstream/libsearch-xapian-perl/current: Changes MANIFEST.SKIP META.yml README XS/Query.xs XS/Stem.xs Xapian.pm makehtmldocs t/create.t t/index.t t/parser.t t/search.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Jul 17 17:26:57 UTC 2008
Author: gregoa
Date: Thu Jul 17 17:26:55 2008
New Revision: 23374
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23374
Log:
[svn-upgrade] Integrating new upstream version, libsearch-xapian-perl (1.0.7.0)
Modified:
branches/upstream/libsearch-xapian-perl/current/Changes
branches/upstream/libsearch-xapian-perl/current/MANIFEST.SKIP
branches/upstream/libsearch-xapian-perl/current/META.yml
branches/upstream/libsearch-xapian-perl/current/README
branches/upstream/libsearch-xapian-perl/current/XS/Query.xs
branches/upstream/libsearch-xapian-perl/current/XS/Stem.xs
branches/upstream/libsearch-xapian-perl/current/Xapian.pm
branches/upstream/libsearch-xapian-perl/current/makehtmldocs
branches/upstream/libsearch-xapian-perl/current/t/create.t
branches/upstream/libsearch-xapian-perl/current/t/index.t
branches/upstream/libsearch-xapian-perl/current/t/parser.t
branches/upstream/libsearch-xapian-perl/current/t/search.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=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/Changes (original)
+++ branches/upstream/libsearch-xapian-perl/current/Changes Thu Jul 17 17:26:55 2008
@@ -1,6 +1,16 @@
Revision history for Perl extension Search::Xapian.
-1.0.6.0 ???
+1.0.7.0 Thu Jul 17 00:18:17 GMT 2008
+ [Changes contributed by Olly Betts]
+ - Handle exceptions from Xapian::Stem constructor (reported by Joey
+ Hess in Debian BTS #486138).
+ - Fix testcase in t/parser.t for improved behaviour of xapian-core.
+ - Actually fill in @Search::Xapian::DB_NAMES.
+ - Search::Xapian::Query->new(<OP>, <TERMS>) now allows integers and
+ numbers as terms - these are coerced to strings as with standard
+ Perl parameter passing.
+
+1.0.6.0 Sun Mar 30 10:20:58 GMT 2008
[Changes contributed by Olly Betts]
- If the Search::Xapian and xapian-config versions don't match, and
$ENV{AUTOMATED_TESTING} is true, then we need to unlink Makefile as
Modified: branches/upstream/libsearch-xapian-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/MANIFEST.SKIP?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/MANIFEST.SKIP (original)
+++ branches/upstream/libsearch-xapian-perl/current/MANIFEST.SKIP Thu Jul 17 17:26:55 2008
@@ -1,17 +1,18 @@
\.svn
Makefile
-Makefile.old
-MANIFEST.old
-MANIFEST.bak
-MANIFEST.OLD
+Makefile\.old
+MANIFEST\.old
+MANIFEST\.bak
+MANIFEST\.OLD
testdb
testdb-exception
testdb-spell
blib
pm_to_blib
.*\.o
-Xapian.c
-Xapian.bs
-Xapian.lo
-Search-Xapian-[0-9.]*.tar.gz
-Search-Xapian-[0-9.]*
+Xapian\.c
+Xapian\.bs
+Xapian\.lo
+Search-Xapian-[0-9.]+\.tar\.gz
+Search-Xapian-[0-9.]+
+html
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=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/META.yml (original)
+++ branches/upstream/libsearch-xapian-perl/current/META.yml Thu Jul 17 17:26:55 2008
@@ -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: Search-Xapian
-version: 1.0.6.0
+version: 1.0.7.0
version_from: Xapian.pm
installdirs: site
requires:
Modified: branches/upstream/libsearch-xapian-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/README?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/README (original)
+++ branches/upstream/libsearch-xapian-perl/current/README Thu Jul 17 17:26:55 2008
@@ -1,4 +1,4 @@
-Search::Xapian version 1.0.6.0
+Search::Xapian version 1.0.7.0
==============================
This is Search::Xapian, a Perl XS frontend to the Xapian C++ search library.
@@ -14,10 +14,14 @@
By default, Makefile.PL looks for xapian-config on your PATH. You can specify
a path for xapian-config by passing XAPIAN_CONFIG=/path/to/xapian-config on
-the command line after Makefile.PL. You can also specify a C++ compiler by
-passing CXX=/usr/local/bin/g++ after Makefile.PL. These values are stored
-in the generated Makefile and will be used if "make" causes "perl Makefile.PL"
-to be automatically rerun (e.g. if you modify Makefile.PL).
+the command line after Makefile.PL. Similarly, you can specify a C++ compiler
+by passing CXX=/usr/local/bin/g++ after Makefile.PL. For example:
+
+ perl Makefile.PL XAPIAN_CONFIG=/home/jim/bin/xapian-config CXX=g++-4.3
+
+These values are stored in the generated Makefile and will be used if "make"
+causes "perl Makefile.PL" to be automatically rerun (e.g. if you modify
+Makefile.PL).
(For compatibility with Search::Xapian 1.0.3.0 and early, XAPIAN_CONFIG and
CXX can also be specified as environmental variables. Specifying them on the
@@ -29,13 +33,13 @@
This module requires these other modules and libraries:
The Xapian C++ search library, which can be downloaded by following
- the instructions on http://www.xapian.org/
+ the instructions on http://xapian.org/
COPYRIGHT AND LICENCE
Please report any bugs/suggestions to <xapian-discuss at lists.xapian.org>
-or use the Xapian bug tracker <http://www.xapian.org/bugs/>. Please do
-NOT use the CPAN bug tracker or mail any of the authors individually.
+or use the Xapian bug tracker <http://xapian.org/bugs>. Please do NOT use the
+CPAN bug tracker or mail any of the authors individually.
Copyright (c) 2002,2003 Alex Bowley. All rights reserved.
Copyright (c) 2003,2004,2005,2006,2007,2008 Olly Betts. All rights reserved.
Modified: branches/upstream/libsearch-xapian-perl/current/XS/Query.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/XS/Query.xs?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/XS/Query.xs (original)
+++ branches/upstream/libsearch-xapian-perl/current/XS/Query.xs Thu Jul 17 17:26:55 2008
@@ -60,7 +60,7 @@
if (sv_isa(sv, "Search::Xapian::Query")) {
Query *query = (Query*) SvIV((SV*) SvRV(sv));
queries.push_back(*query);
- } else if ( SvOK(sv) && SvPOK(sv) ) {
+ } else if ( SvOK(sv) ) {
STRLEN len;
const char * ptr = SvPV(sv, len);
queries.push_back(Query(string(ptr, len)));
Modified: branches/upstream/libsearch-xapian-perl/current/XS/Stem.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/XS/Stem.xs?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/XS/Stem.xs (original)
+++ branches/upstream/libsearch-xapian-perl/current/XS/Stem.xs Thu Jul 17 17:26:55 2008
@@ -6,7 +6,11 @@
Stem::new(language)
string language
CODE:
- RETVAL = new Stem(language);
+ try {
+ RETVAL = new Stem(language);
+ } catch (const Error &error) {
+ croak( "Exception: %s", error.get_msg().c_str() );
+ }
OUTPUT:
RETVAL
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=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/Xapian.pm (original)
+++ branches/upstream/libsearch-xapian-perl/current/Xapian.pm Thu Jul 17 17:26:55 2008
@@ -4,7 +4,7 @@
use strict;
use warnings;
-our $VERSION = '1.0.6.0';
+our $VERSION = '1.0.7.0';
use Exporter 'import';
@@ -111,7 +111,7 @@
}
our @DB_NAMES;
-foreach (@{ $EXPORT_TAGS{'dbs'} }) {
+foreach (@{ $EXPORT_TAGS{'db'} }) {
$DB_NAMES[eval $_] = $_;
}
@@ -160,7 +160,7 @@
There are some gaps in the POD documentation for wrapped classes, but you
can read the Xapian C++ API documentation at
-L<http://www.xapian.org/docs/apidoc/html/annotated.html> for details of
+L<http://xapian.org/docs/apidoc/html/annotated.html> for details of
these. Alternatively, take a look at the code in the examples and tests.
If you want to use Search::Xapian and the threads module together, make
@@ -171,7 +171,7 @@
If you encounter problems, or have any comments, suggestions, patches, etc
please email the Xapian-discuss mailing list (details of which can be found at
-L<http://www.xapian.org/lists.php>).
+L<http://xapian.org/lists>).
=head2 EXPORT
@@ -391,7 +391,7 @@
Alex Bowley E<lt>kilinrax at cpan.orgE<gt>
Please report any bugs/suggestions to E<lt>xapian-discuss at lists.xapian.orgE<gt>
-or use the Xapian bug tracker L<http://www.xapian.org/bugs/>. Please do
+or use the Xapian bug tracker L<http://xapian.org/bugs>. Please do
NOT use the CPAN bug tracker or mail any of the authors individually.
=head1 SEE ALSO
@@ -413,6 +413,6 @@
L<Search::Xapian::Weight>,
L<Search::Xapian::WritableDatabase>,
and
-L<http://www.xapian.org/>.
+L<http://xapian.org/>.
=cut
Modified: branches/upstream/libsearch-xapian-perl/current/makehtmldocs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/makehtmldocs?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/makehtmldocs (original)
+++ branches/upstream/libsearch-xapian-perl/current/makehtmldocs Thu Jul 17 17:26:55 2008
@@ -65,7 +65,7 @@
<p>No Perl-specific documentation currently exists for class
<code>$class</code> - please refer to the
-<a href="http://www.xapian.org/docs/apidoc/html/annotated.html">C++
+<a href="http://xapian.org/docs/apidoc/html/annotated.html">C++
API documentation</a> for now.
</body>
Modified: branches/upstream/libsearch-xapian-perl/current/t/create.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/t/create.t?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/t/create.t (original)
+++ branches/upstream/libsearch-xapian-perl/current/t/create.t Thu Jul 17 17:26:55 2008
@@ -3,32 +3,26 @@
#########################
-# change 'tests => 1' to 'tests => last_test_to_print';
+use Test::More;
+BEGIN { plan tests => 4 };
+use Search::Xapian qw(:standard);
-use Test;
-use Devel::Peek;
-BEGIN { plan tests => 3 };
-use Search::Xapian qw(:standard);
ok(1); # If we made it this far, we're ok.
#########################
-# Insert your test code below, the Test module is use()ed here so read
-# its man page ( perldoc Test ) for help writing this test script.
-
-# first create database dir, if it doesn't exist;
my $db_dir = 'testdb';
-if( (! -e $db_dir) or (! -d $db_dir) ) {
- mkdir( $db_dir );
+# Delete contents of database dir, if it exists.
+if (opendir( DB_DIR, $db_dir )) {
+ while( defined( my $file = readdir( DB_DIR ) ) ) {
+ next if $file =~ /^\.+$/;
+ unlink( "$db_dir/$file" ) or die "Could not delete '$db_dir/$file': $!";
+ }
+ closedir( DB_DIR );
}
-opendir( DB_DIR, $db_dir );
-while( defined( my $file = readdir( DB_DIR ) ) ) {
- next if $file =~ /^\.+$/;
- unlink( "$db_dir/$file" ) or die "Could not delete '$db_dir/$file': $!";
-}
-closedir( DB_DIR );
+is( $Search::Xapian::DB_NAMES[Search::Xapian::DB_CREATE], "DB_CREATE" );
my $database;
ok( $database = Search::Xapian::WritableDatabase->new( $db_dir, Search::Xapian::DB_CREATE ) );
Modified: branches/upstream/libsearch-xapian-perl/current/t/index.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/t/index.t?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/t/index.t (original)
+++ branches/upstream/libsearch-xapian-perl/current/t/index.t Thu Jul 17 17:26:55 2008
@@ -6,7 +6,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More;
-BEGIN { plan tests => 76 };
+BEGIN { plan tests => 77 };
use Search::Xapian qw(:standard);
#########################
@@ -86,4 +86,11 @@
is( $database->get_metadata( "foo" ), "bar" );
}
+# Check that trying to create an invalid stemmer gives an exception, not an
+# abort.
+eval {
+ my $badstem = Search::Xapian::Stem->new( 'gibberish' );
+};
+ok( $@ =~ /^Exception: Language code gibberish unknown at \S+ line \d+\.$/ );
+
1;
Modified: branches/upstream/libsearch-xapian-perl/current/t/parser.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/t/parser.t?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/t/parser.t (original)
+++ branches/upstream/libsearch-xapian-perl/current/t/parser.t Thu Jul 17 17:26:55 2008
@@ -135,7 +135,7 @@
# called.
$qp = Search::Xapian::QueryParser->new;
eval {
- $qp->parse_query('foo other* this AND more', FLAG_BOOLEAN|FLAG_WILDCARD);
+ $qp->parse_query('other* AND', FLAG_BOOLEAN|FLAG_WILDCARD);
};
ok( $@ =~ /^Exception: Syntax: <expression> AND <expression> at \S+ line \d+\.$/ );
Modified: branches/upstream/libsearch-xapian-perl/current/t/search.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-xapian-perl/current/t/search.t?rev=23374&op=diff
==============================================================================
--- branches/upstream/libsearch-xapian-perl/current/t/search.t (original)
+++ branches/upstream/libsearch-xapian-perl/current/t/search.t Thu Jul 17 17:26:55 2008
@@ -6,7 +6,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More;
-BEGIN { plan tests => 108 };
+BEGIN { plan tests => 109 };
use Search::Xapian qw(:ops);
#########################
@@ -158,4 +158,8 @@
ok( "$alltermit" eq 'two' );
ok( ++$alltermit == $db->allterms_end('t') );
+# Check that non-string scalars get coerced.
+my $numberquery = Search::Xapian::Query->new( OP_OR, (12, "34", .5) );
+is( $numberquery->get_description(), "Xapian::Query((12 OR 34 OR 0.5))" );
+
1;
More information about the Pkg-perl-cvs-commits
mailing list