O'Reilly logo

Practical Internet Groupware by Jon Udell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Docbase::Indexer

Example 7.17 shows a script that uses the services of Docbase::Indexer to build both static and dynamic navigational controls for the ProductAnalysis docbase.

Example 7-17. A Docbase::Indexer Driver Script

#! perl -w

use strict;

my $app = "ProductAnalysis";

my @indexed_fields = ('company','product','analyst','duedate');

use Docbase::Docbase;
my $db = Docbase::Docbase->new($app);

use Docbase::Indexer;

my $di = Docbase::Indexer->new($db,\@indexed_fields);

$di->buildIndexStructures;

$di->buildTabbedIndexes;

$di->buildSequenceStructures;

$di->buildStaticControls;      # optional, only for static version

You could arrange to run this script after each record is added to the docbase. More likely, you’ll want to schedule it to run periodically by using a crontab entry on a Unix-like system or an AT command on NT.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required