#!/usr/bin/perl -wT
use strict;
# A "program" is an operating method inside eidetic (docsys, eacct, etc)
# A "module" is a set of routines associated with a specific program function
#  (host, user, host_type, etc)

$| = 1; # Flush STDOUT

use Eidetic;

my $program = 'tester';

my $e=new Eidetic(program_name => $program);

# Configure application
if (!$e->configure(
	fields => [
			 special_field => undef
			 another_config_field => undef
		  ]
)) {
	die "Cannot configure program:";
}

# In the future, register new commands here...

# Get the loaded configuration
my $conf = $e->getConfig();
# Create a personal object to use with your functions, configured
# with info from the config file
my $obj = new Some::Object(
                  database            => $DB,
                  archive_path        => $conf->{archive_path},
                  noimage_path        => $conf->{noimage_path},
                  default_extension   => $conf->{default_extension},
                  default_language    => $conf->{default_language},
                  tmp_path            => $conf->{tmp_path},
                  archive_permissions => $conf->{archive_permissions}
                  );

# Tell eidetic to use this object
$e->useObject($obj);

# Register all the access modules
$e->registerModule(name => 'documents',
                   table => 'document',
                   commands => [ qw( display search ) ],
		   queries => {
				'tablename',
				'filter',
				'sort'
			},
		);
$e->registerModule(name => 'folders',
		   table => 'folder',
                   commands => [ qw( display search ) ],
		);
$e->registerModule(name => 'licenses',
		   table => 'license',
                   commands => [ qw( display ) ],
		);
$e->registerModule(name => 'languages',
		   table => 'language',
                   commands => [ qw( display ) ],
		);
$e->registerModule(name => 'projects',
		   table => 'project',
                   commands => [ qw( display ) ],
		);
$e->registerModule(name => 'users',
		   table => 'user',
                   commands => [ qw( display ) ],
		);

$e->main();

Brought to you by the Open Source Development Labs