readded DBIx::FullTextSearch because it's almost impossible to add locally

This commit is contained in:
JT Smith 2005-04-24 01:05:29 +00:00
parent a5b07a2599
commit 598ccd1766
12 changed files with 5558 additions and 0 deletions

View file

@ -0,0 +1,27 @@
package DBIx::FullTextSearch::File;
use DBIx::FullTextSearch::String;
use strict;
use vars qw! @ISA !;
@ISA = qw! DBIx::FullTextSearch::String !;
sub index_document {
my ($self, $file, $extra_data) = @_;
my $dbh = $self->{'dbh'};
open FILE, $file or do {
$self->{'errstr'} = "Reading the file `$file' failed: $!";
return;
};
my $data;
{
local $/ = undef;
$data = <FILE>;
}
$data .= " $extra_data" if $extra_data;
close FILE;
$self->SUPER::index_document($file, $data);
}
1;