WAIT
view release on metacpan or search on metacpan
lib/WAIT/Index.pm view on Meta::CPAN
}
unless ($self->{attr} = $parm{attr}) {
require Carp;
Carp::croak("No attributes specified");
}
bless $self, ref($type) || $type;
}
sub drop {
my $self = shift;
if ((caller)[0] eq 'WAIT::Table') { # Table knows about this
my $file = $self->{file};
! (!-e $file or unlink $file);
} else { # notify our database
require Carp;
Carp::croak(ref($self)."::drop called directly");
}
}
sub open {
my $self = shift;
lib/WAIT/InvertedIndex.pm view on Meta::CPAN
if (@_) {
"map(&WAIT::Filter::$filter(\$_), " . _filtergen(@_) . ')';
} else {
"map(&WAIT::Filter::$filter(\$_), \@_)";
}
}
sub drop {
my $self = shift;
if ((caller)[0] eq 'WAIT::Table') { # Table knows about this
my $file = $self->{file};
! (!-e $file or unlink $file);
} else { # notify our database
croak ref($self)."::drop called directly";
}
}
sub open {
my $self = shift;
lib/WAIT/Table.pm view on Meta::CPAN
sub fields { keys %{$_[0]->{inverted}}}
=head2 C<$tb-E<gt>drop>
Must be called via C<WAIT::Database::drop_table>
=cut
sub drop {
my $self = shift;
if ((caller)[0] eq 'WAIT::Database') { # database knows about this
$self->close; # just make sure
my $file = $self->{file};
for (values %{$self->{indexes}}) {
$_->drop;
}
unlink "$file/records";
# $self->unlock;
! (!-e $file or rmdir $file);
} else {
( run in 0.328 second using v1.01-cache-2.11-cpan-a3c8064c92c )