r44017 - in /trunk/libsearch-xapian-perl: ./ Xapian/ debian/ debian/patches/ examples/ t/
carnil-guest at users.alioth.debian.org
carnil-guest at users.alioth.debian.org
Sun Sep 13 10:40:27 UTC 2009
Author: carnil-guest
Date: Sun Sep 13 10:40:21 2009
New Revision: 44017
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44017
Log:
* New upstream release
* debian/control:
- Add myself to Uploaders
- Drop versioned Build-Depends on perl for version older that the one in
etch (5.8.8).
* Drop debian/patches and quilt Build-Depends since patch is integrated
upstream. Remove README.source.
* Bump Standards-Version to 3.8.3 (no changes).
Removed:
trunk/libsearch-xapian-perl/debian/README.source
trunk/libsearch-xapian-perl/debian/patches/
Modified:
trunk/libsearch-xapian-perl/Changes
trunk/libsearch-xapian-perl/META.yml
trunk/libsearch-xapian-perl/Makefile.PL
trunk/libsearch-xapian-perl/README
trunk/libsearch-xapian-perl/Xapian.pm
trunk/libsearch-xapian-perl/Xapian.xs
trunk/libsearch-xapian-perl/Xapian/QueryParser.pm
trunk/libsearch-xapian-perl/debian/changelog
trunk/libsearch-xapian-perl/debian/control
trunk/libsearch-xapian-perl/examples/full-searcher.pl
trunk/libsearch-xapian-perl/examples/simpleexpand.pl
trunk/libsearch-xapian-perl/examples/simplematchdecider.pl
trunk/libsearch-xapian-perl/examples/simplesearch.pl
trunk/libsearch-xapian-perl/t/03podcoverage.t
trunk/libsearch-xapian-perl/t/search.t
Modified: trunk/libsearch-xapian-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Changes?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Changes (original)
+++ trunk/libsearch-xapian-perl/Changes Sun Sep 13 10:40:21 2009
@@ -1,8 +1,25 @@
Revision history for Perl extension Search::Xapian.
+1.0.16.0 Thu Sep 10 06:26:08 UTC 2009
+ [Changes contributed by Olly Betts]
+ - Improve documentation of QueryParser::set_default_op() and
+ QueryParser::get_default_op().
+ - examples/: Use MSet::items() (new in 1.0.13.1).
+ - examples/simpleexpand.pl: Remove debug print statement left in by
+ accident.
+ - Add dependency to regenerate Makefile if Xapian.pm changes (since the
+ former contains a version number extracted from the latter).
+ - Add better test coverage for MatchDecider.
+
+1.0.15.0 Wed Aug 26 14:59:31 GMT 2009
+ [Changes contributed by Frank Lichtenheld]
+ - Run POD coverage tests if TEST_POD_COVERAGE is set rather than
+ TEST_POD so that the other POD tests can easily be enabled without
+ enabling the coverage tests.
+
1.0.14.0 Tue Jul 21 16:10:19 GMT 2009
[Changes contributed by Olly Betts]
- - Add handling of C++ exceptions from methods of Document (ticket#284).
+ - Add handling of C++ exceptions from methods of Document (ticket#284).
1.0.13.1 Tue May 26 13:51:18 GMT 2009
[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=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/META.yml (original)
+++ trunk/libsearch-xapian-perl/META.yml Sun Sep 13 10:40:21 2009
@@ -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.14.0
+version: 1.0.16.0
version_from: Xapian.pm
installdirs: site
requires:
Modified: trunk/libsearch-xapian-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Makefile.PL?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Makefile.PL (original)
+++ trunk/libsearch-xapian-perl/Makefile.PL Sun Sep 13 10:40:21 2009
@@ -113,15 +113,16 @@
# AUTHOR => 'Alex Bowley <kilinrax at cpan.org>') : ()),
$libsvar => $libs, # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
- 'CC' => $CC,
+ 'CC' => $CC,
'CCFLAGS' => $CCFLAGS,
- 'LD' => $LD,
+ 'LD' => $LD,
'INC' => $inc, # e.g., '-I/usr/include/other'
- 'XSOPT' => '-C++',
- # 'typemap' is implicitly added to this list.
- 'TYPEMAPS' => ['perlobject.map'],
+ 'XSOPT' => '-C++',
+ # 'typemap' is implicitly added to this list.
+ 'TYPEMAPS' => ['perlobject.map'],
# Add "make check" as alias for "make test".
- 'depend' => { 'check' => 'test' },
+ # Make sure that we rebuild the Makefile if the version number changes.
+ 'depend' => { 'check' => 'test', 'Makefile' => 'Xapian.pm' },
);
my $VERSION = "unknown";
Modified: trunk/libsearch-xapian-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/README?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/README (original)
+++ trunk/libsearch-xapian-perl/README Sun Sep 13 10:40:21 2009
@@ -1,4 +1,4 @@
-Search::Xapian version 1.0.14.0
+Search::Xapian version 1.0.16.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=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian.pm (original)
+++ trunk/libsearch-xapian-perl/Xapian.pm Sun Sep 13 10:40:21 2009
@@ -4,7 +4,7 @@
use strict;
use warnings;
-our $VERSION = '1.0.14.0';
+our $VERSION = '1.0.16.0';
use Exporter 'import';
Modified: trunk/libsearch-xapian-perl/Xapian.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Xapian.xs?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian.xs (original)
+++ trunk/libsearch-xapian-perl/Xapian.xs Sun Sep 13 10:40:21 2009
@@ -60,52 +60,48 @@
};
class perlMatchDecider : public Xapian::MatchDecider {
- private:
- SV *callback;
- public:
- perlMatchDecider(SV *func) {
- callback = newSVsv(func);
- }
-
- ~perlMatchDecider() {
- SvREFCNT_dec(callback);
- }
-
- bool operator()(const Xapian::Document &doc) const {
- dSP;
- Document *pdoc;
-
- ENTER;
- SAVETMPS;
-
- PUSHMARK(SP);
-
- pdoc = new Document();
- *pdoc = doc;
-
- SV *arg;
- arg = sv_newmortal();
- sv_setref_pv(arg, "Search::Xapian::Document", (void *)pdoc);
- XPUSHs(arg);
-
- PUTBACK;
-
- int count = call_sv(callback, G_SCALAR);
-
- SPAGAIN;
- if (count != 1)
- croak("callback function should return 1 value, got %d", count);
-
- SV *decide_result = POPs;
- int decide_actual_result = SvIV(decide_result);
-
- PUTBACK;
-
- FREETMPS;
- LEAVE;
-
- return decide_actual_result;
- }
+ SV *callback;
+
+ public:
+ perlMatchDecider(SV *func) {
+ callback = newSVsv(func);
+ }
+
+ ~perlMatchDecider() {
+ SvREFCNT_dec(callback);
+ }
+
+ bool operator()(const Xapian::Document &doc) const {
+ dSP;
+
+ ENTER;
+ SAVETMPS;
+
+ PUSHMARK(SP);
+
+ SV *arg = sv_newmortal();
+
+ Document *pdoc = new Document(doc);
+ sv_setref_pv(arg, "Search::Xapian::Document", (void *)pdoc);
+ XPUSHs(arg);
+
+ PUTBACK;
+
+ int count = call_sv(callback, G_SCALAR);
+
+ SPAGAIN;
+ if (count != 1)
+ croak("callback function should return 1 value, got %d", count);
+
+ int decide_actual_result = POPi;
+
+ PUTBACK;
+
+ FREETMPS;
+ LEAVE;
+
+ return decide_actual_result;
+ }
};
MODULE = Search::Xapian PACKAGE = Search::Xapian
Modified: trunk/libsearch-xapian-perl/Xapian/QueryParser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Xapian/QueryParser.pm?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian/QueryParser.pm (original)
+++ trunk/libsearch-xapian-perl/Xapian/QueryParser.pm Sun Sep 13 10:40:21 2009
@@ -82,12 +82,19 @@
=item set_default_op <operator>
-Set default operator for joining elements. Useful values are
-OP_AND and OP_OR. See L<Search::Xapian> for descriptions of these constants.
+Set the default operator.
+
+This operator is used to combine non-filter query items when no
+explicit operator is used.
+
+The most useful values for this are OP_OR (the default) and OP_AND.
+OP_NEAR and OP_PHRASE can also be useful.
+
+See L<Search::Xapian> for descriptions of these constants.
=item get_default_op
-Returns the default operator for joining elements.
+Returns the current default operator.
=item set_database <database>
Modified: trunk/libsearch-xapian-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/debian/changelog?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/debian/changelog (original)
+++ trunk/libsearch-xapian-perl/debian/changelog Sun Sep 13 10:40:21 2009
@@ -1,8 +1,19 @@
-libsearch-xapian-perl (1.0.14.0-2) UNRELEASED; urgency=low
+libsearch-xapian-perl (1.0.16.0-1) UNRELEASED; urgency=low
+ [ Ryan Niebur ]
* Update jawnsy's email address
- -- Ryan Niebur <ryanryan52 at gmail.com> Tue, 01 Sep 2009 21:19:38 -0700
+ [ Salvatore Bonaccorso ]
+ * New upstream release
+ * debian/control:
+ - Add myself to Uploaders
+ - Drop versioned Build-Depends on perl for version older that the one in
+ etch (5.8.8).
+ * Drop debian/patches and quilt Build-Depends since patch is integrated
+ upstream. Remove README.source.
+ * Bump Standards-Version to 3.8.3 (no changes).
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com> Sun, 13 Sep 2009 12:39:13 +0200
libsearch-xapian-perl (1.0.14.0-1) unstable; urgency=low
Modified: trunk/libsearch-xapian-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/debian/control?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/debian/control (original)
+++ trunk/libsearch-xapian-perl/debian/control Sun Sep 13 10:40:21 2009
@@ -1,13 +1,14 @@
Source: libsearch-xapian-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7), perl (>= 5.8.0-7), libtest-pod-perl,
- libxapian-dev (>= 1.0.14), quilt
+Build-Depends: debhelper (>= 7), perl, libtest-pod-perl,
+ libxapian-dev (>= 1.0.14)
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Krzysztof Krzyzaniak (eloy) <eloy at debian.org>,
Frank Lichtenheld <djpig at debian.org>, Jose Luis Rivas <ghostbar38 at gmail.com>,
Damyan Ivanov <dmn at debian.org>, gregor herrmann <gregoa at debian.org>,
- Ryan Niebur <ryanryan52 at gmail.com>, Jonathan Yu <jawnsy at cpan.org>
+ Ryan Niebur <ryanryan52 at gmail.com>, Jonathan Yu <jawnsy at cpan.org>,
+ Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>
Standards-Version: 3.8.2
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libsearch-xapian-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libsearch-xapian-perl/
Modified: trunk/libsearch-xapian-perl/examples/full-searcher.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/examples/full-searcher.pl?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/examples/full-searcher.pl (original)
+++ trunk/libsearch-xapian-perl/examples/full-searcher.pl Sun Sep 13 10:40:21 2009
@@ -131,7 +131,7 @@
$mset->get_matches_estimated();
print "Results 1-$msize:\n";
- foreach my $m (tie_mset($mset)) {
+ foreach my $m ($mset->items()) {
printf "#%u: Score %u%%: %s\n",
$m->get_rank() + 1,
$m->get_percent(),
@@ -143,11 +143,3 @@
print STDERR "Exception: $@\n";
exit 1;
}
-
-# Helper function which allows a Search::Xapian::MSet to be accessed as if it
-# were a Perl array.
-sub tie_mset {
- my @a;
- tie( @a, 'Search::Xapian::MSet::Tied', shift );
- return @a;
-}
Modified: trunk/libsearch-xapian-perl/examples/simpleexpand.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/examples/simpleexpand.pl?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/examples/simpleexpand.pl (original)
+++ trunk/libsearch-xapian-perl/examples/simpleexpand.pl Sun Sep 13 10:40:21 2009
@@ -50,7 +50,6 @@
my $reldocs = Search::Xapian::RSet->new();
foreach my $did (@ARGV[$sep_index + 1 .. $#ARGV]) {
$reldocs->add_document($did);
- print "rel: $did\n";
}
# Parse the query string to produce a Xapian::Query object.
@@ -73,9 +72,7 @@
printf "%i results found.\n", $mset->get_matches_estimated();
printf "Results 1-%i:\n", $mset->size();
- # In 1.0.13.0 and newer you'll be able to replace this with:
- # foreach my $m ($mset->matches()) {
- foreach my $m (tie_mset($mset)) {
+ foreach my $m ($mset->items()) {
printf "%i: %i%% docid=%i [%s]\n", $m->get_rank() + 1, $m->get_percent(), $m->get_docid(), $m->get_document()->get_data();
}
}
@@ -86,7 +83,7 @@
if ($last > 4) {
$last = 4;
}
- foreach my $m ((tie_mset($mset))[0..$last]) {
+ foreach my $m (($mset->items())[0..$last]) {
$reldocs->add_document($m->get_docid());
}
}
@@ -104,9 +101,3 @@
print STDERR "Exception: $@\n";
exit(1);
}
-
-sub tie_mset {
- my @a;
- tie( @a, 'Search::Xapian::MSet::Tied', shift );
- return @a;
-}
Modified: trunk/libsearch-xapian-perl/examples/simplematchdecider.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/examples/simplematchdecider.pl?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/examples/simplematchdecider.pl (original)
+++ trunk/libsearch-xapian-perl/examples/simplematchdecider.pl Sun Sep 13 10:40:21 2009
@@ -70,9 +70,7 @@
printf "%i results found.\n", $mset->get_matches_estimated();
printf "Results 1-%i:\n", $mset->size();
- # In 1.0.13.0 and newer you'll be able to replace this with:
- # foreach my $m ($mset->matches()) {
- foreach my $m (tie_mset($mset)) {
+ foreach my $m ($mset->items()) {
printf "%i: %i%% docid=%i [%s]\n", $m->get_rank() + 1, $m->get_percent(), $m->get_docid(), $m->get_document()->get_data();
}
};
@@ -80,9 +78,3 @@
print STDERR "Exception: $@\n";
exit(1);
}
-
-sub tie_mset {
- my @a;
- tie( @a, 'Search::Xapian::MSet::Tied', shift );
- return @a;
-}
Modified: trunk/libsearch-xapian-perl/examples/simplesearch.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/examples/simplesearch.pl?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/examples/simplesearch.pl (original)
+++ trunk/libsearch-xapian-perl/examples/simplesearch.pl Sun Sep 13 10:40:21 2009
@@ -58,9 +58,7 @@
printf "%i results found.\n", $mset->get_matches_estimated();
printf "Results 1-%i:\n", $mset->size();
- # In 1.0.13.0 and newer you'll be able to replace this with:
- # foreach my $m ($mset->matches()) {
- foreach my $m (tie_mset($mset)) {
+ foreach my $m ($mset->items()) {
printf "%i: %i%% docid=%i [%s]\n", $m->get_rank() + 1, $m->get_percent(), $m->get_docid(), $m->get_document()->get_data();
}
};
@@ -68,9 +66,3 @@
print STDERR "Exception: $@\n";
exit(1);
}
-
-sub tie_mset {
- my @a;
- tie( @a, 'Search::Xapian::MSet::Tied', shift );
- return @a;
-}
Modified: trunk/libsearch-xapian-perl/t/03podcoverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/03podcoverage.t?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/03podcoverage.t (original)
+++ trunk/libsearch-xapian-perl/t/03podcoverage.t Sun Sep 13 10:40:21 2009
@@ -2,6 +2,6 @@
eval "use Test::Pod::Coverage 1.04";
plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+plan skip_all => 'set TEST_POD_COVERAGE to enable this test' unless $ENV{TEST_POD_COVERAGE};
all_pod_coverage_ok({also_private => [qr/[^\d][0123]$/]});
Modified: trunk/libsearch-xapian-perl/t/search.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/search.t?rev=44017&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/search.t (original)
+++ trunk/libsearch-xapian-perl/t/search.t Sun Sep 13 10:40:21 2009
@@ -6,7 +6,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More;
-BEGIN { plan tests => 109 };
+BEGIN { plan tests => 114 };
use Search::Xapian qw(:ops);
#########################
@@ -88,9 +88,9 @@
is( $match, $matches->end(), "match set returns correct endpoint");
my $rset;
-ok( $rset = Search::Xapian::RSet->new(), "relevance set returned ok" );
+ok( $rset = Search::Xapian::RSet->new(), "relevance set created ok" );
$rset->add_document( 1 );
-ok( $rset->contains( 1 ), "document added to relevance setsuccessfully" );
+ok( $rset->contains( 1 ), "document added to relevance set successfully" );
ok( !$rset->contains( 2 ), "relevance set correctly fails to match document it does not contain" );
$rset->remove_document( 1 );
ok( !$rset->contains( 1 ), "document removed from relevance set successfully" );
@@ -102,8 +102,24 @@
ok( $matches3 = $enq->get_mset(0, 10, 11, $rset), "get_mset with check_at_least and rset" );
is( $matches3->size, $matches->size, "rset and check_at_least don't change mset size" );
+my $d;
# This was generating a warning converting "0" to an RSet object:
-ok( $matches3 = $enq->get_mset(0, 10, sub { return 1; }), "get_mset with matchdecider" );
+ok( $matches3 = $enq->get_mset(0, 10,
+ sub { $d = scalar @_; return $_[0]->get_value(0) ne ""; }),
+ "get_mset with matchdecider" );
+ok( defined $d, "matchdecider was called" );
+ok( $d == 1, "matchdecider got an argument" );
+
+sub mdecider {
+ $d = scalar @_;
+ return $_[0]->get_value(0) ne "";
+}
+
+$d = undef;
+ok( $matches3 = $enq->get_mset(0, 10, \&mdecider),
+ "get_mset with named matchdecider function" );
+ok( defined $d, "matchdecider was called" );
+ok( $d == 1, "matchdecider got an argument" );
my $eset;
ok( $eset = $enq->get_eset( 10, $rset ), "can get expanded terms set" );
More information about the Pkg-perl-cvs-commits
mailing list