Martin Owens > Template-Direct-1.16 > Template::Direct::Conditional

Download:
Template-Direct-1.16.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Template::Direct::Conditional - Handle a conditonal in a template

DESCRIPTION ^

  Provide support for conditionals in templates

$class->new( $index, $line )

  Create a new instance object.

$if->tagName( )

  Returns 'if'

$if->subTags( )

  Returns a list of expected sub tags: [else, elif]

$if->conditional( )

  Returns the conditional statement fromt he template.

$if->compile( )

  Modifies a template with the data listed correctly.

$if->parseConditional($tokenString, $dataStructure)

  Reduce a string conditional into a boolean

$if->parseLogical( $tokens )

    Take tokens and group logical statements by and/or

NAME ^

Template::Direct::Conditional::Tokens - Handle a list of conditional tokens

METHODS ^

$class->new( $list )

  Return a list of tokens object.

$tokens->executeConditional( $conditional )

    suck in triples and output booleans

$tokens->append( $item )

  Add a token to this token list.

$tokens->lastItem( )

  Return the last item from this token list.

$tokens->iterator( )

  Return the token list as an array.

NAME ^

Template::Direct::Conditional::Array - Handle arrays in conditionals

METHODS ^

$class->new( $list )

  Return an array object.

$array->in( $var )

  Return true if var is in this array.

OVERLOADED ^

  All the kinds of overloading this object has on it.

AUTHOR ^

  Martin Owens - Copyright 2007, AGPL
syntax highlighting: