Fix build with xapian-core < 1.4.10
[xapian.git] / search-xapian / Xapian / BoolWeight.pm
blob121ada7ee621a4729cad565fd2e7b71db957b99f
1 package Search::Xapian::BoolWeight;
3 use 5.006;
4 use strict;
5 use warnings;
6 use Carp;
8 use Search::Xapian::Weight;
10 require DynaLoader;
12 our @ISA = qw( DynaLoader Search::Xapian::Weight);
14 # In a new thread, copy objects of this class to unblessed, undef values.
15 sub CLONE_SKIP { 1 }
17 sub new {
18 my $class = shift;
19 my $weight;
21 if (scalar(@_) == 0) {
22 $weight = new1();
23 } else {
24 Carp::carp("USAGE: $class->new()");
25 exit;
27 bless $weight, $class;
28 return $weight;
33 __END__
35 =head1 NAME
37 Search::Xapian::BoolWeight - Boolean Weighting scheme.
39 =head1 DESCRIPTION
41 Boolean Weighting scheme. All documents get a weight of 0.
43 =head1 METHODS
45 =over 4
47 =item new
49 Constructor. Takes no arguments.
51 =back
53 =head1 SEE ALSO
55 L<Search::Xapian>,
56 L<Search::Xapian::Enquire>
58 =cut