Barry King > Apache-Wyrd > Apache::Wyrd::Interfaces::IndexUser

Download:
Apache-Wyrd-0.98.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.98   Source  

NAME ^

Apache::Wyrd::Interfaces::IndexUser - Convenience Class for Index-driven Wyrds

SYNOPSIS ^

        use base qw(Apache::Wyrd::Intefaces::IndexUser Apache::Wyrd);

        sub _startup {
                my ($self) = @_;
                $self->_init_index;
        }

        sub _format_output {
                my ($self) = @_;
                $self->index->update_entry($self);

                ...

        }

        sub _shutdown {
                my ($self) = @_;
                $self->_dispose_index;
        }

DESCRIPTION ^

A very simple and lazy inteface for invoking a BASECLASS::Index object as an index and storing it as $self->{index};

METHODS ^

_init_index

Invoke a handle to a new default index (assuming the class BASECLASS::Index holds a default definition and put it in the index data key of the Wyrd. It can then be used at any point in the body of the Wyrd's perl code.

_dispose_index

Shutdown the index and dispose of the handle. Must be called to avoid database/dbfile handle "leaks" (open but dead database connections).

AUTHOR ^

Barry King <wyrd@nospam.wyrdwright.com>

SEE ALSO ^

Apache::Wyrd

General-purpose HTML-embeddable perl object

LICENSE ^

Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.

See LICENSE under the documentation for Apache::Wyrd.

syntax highlighting: