David Muir Sharnoff > HTML-Transmorgify-0.09 > HTML::Transmorgify::ObjectGlue

Download:
modules/HTML-Transmorgify-0.09.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source   Latest Release: HTML-Transmorgify-0.12

NMAE ^

 HTML::Transmorgify::ObjectGlue - virtual base clase for HTML::Transmorgify::Metatags objects

SYNOPSIS ^

 use base qw(HTML::Transmorgify::ObjectGlue);

 sub text
 {
        my ($self) = @_;
        return "a text representation of the whole object"
 }

 sub lookup
 {
        my ($self, $key) = @_;
        return $a_subkey_of_the_object;
 }

 sub expand
 {
        my ($self) = @_;
        return @a_list_of_items_in_the_object
 }

 sub set
 {
        my ($self, $key, $value) = @_;
        maybe: $self->{$key} = $value 
 }

DESCRIPTION ^

This is a virtual base class for HTML::Transmorgify variables that are accessed by HTML::Transmorgify::Metatags directives.

Variables can have multiple components to their names, separated with dot (.) and the components will be looked up one-by-one.

There are four methods that need to be implemented:

text()

Convert the entire object to a text string.

lookup($key)

Look up a value within the object. The return value can be a scalar, a hash ref, an array ref, or another HTML::Transmorgify::ObjectGlue-based object.

expand

Return a list of the sub-objects in the object. This is used by HTML::Transmorgify::Metatags for iterating over the sub-objects with <foreach>.

set

XXX

syntax highlighting: