Apache-Wyrd

 view release on metacpan or  search on metacpan

Wyrd/Site/Index.pm  view on Meta::CPAN

package Apache::Wyrd::Site::Index;
use base qw(Apache::Wyrd::Services::Index);
use Apache::Wyrd::Services::SAK qw(:file);
use HTTP::Request::Common;
use BerkeleyDB;
our $VERSION = '0.98';
use strict;

=pod

=head1 NAME

Apache::Wyrd::Site::Index - Wrapper Index for the Apache::Wyrd::Site classes

=head1 SYNOPSIS

  use base qw(Apache::Wyrd::Site::Index);

  sub new {
    my ($class) = @_;
    my $init = {
      file => '/var/www/data/pageindex.db',
      debug => 0,
      reversemaps => 1,
      bigfile => 1,
      attributes => [qw(doctype meta)],
      maps => [qw(meta)]
    };
    return &Apache::Wyrd::Site::Index::new($class, $init);
  }
  
  sub ua {
    return BASENAME::UA->new;
  }
  
  sub skip_file {
    my ($self, $file) = @_;
    return 1 if ($file eq 'test.html');
    return;
  }

=head1 DESCRIPTION

C<Apache::Wyrd::Site::Index> provides an extended version of the
C<Apache::Wyrd::Services::Index> object for use in the C<Apache::Wyrd::Site>
hierarchy.

Although it does not extend the parent class to include useful indexable
attributes beyond the default ones (attributes: reverse, timestamp, digest,
data, word, wordcount, title, keywords, description; maps: word), there are
several that are used by Pull Wyrds in the hierarchy that need to be passed
to the initialization hash (see SYNOPSIS for an example) to utilize them. 
These are: attributes doctype, section, parent, shorttitle, published, auth,
orderdate, eventdate, tags, children and maps tags, children.  See
C<Apache::Wyrd::Site::Page>

=head2 METHODS

Note: This class extends the Apach::Wyrd::Services::Index class, so check
the documentation of that module for most methods.  It provides an index of
Apache::Wyrd::Site::Page objects.

I<(format: (returns) name (arguments after self))>



( run in 0.632 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )