Chris Winters > OpenInteract-1.99_06 > OpenInteract2::Action::TemplateOnly

Download:
OpenInteract-1.99_06.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 1.07   Source  

NAME ^

OpenInteract2::Action::TemplateOnly - Base class for template-only actions

SYNOPSIS ^

 # Declare your action with the necessary action_type...
 
 [login_box]
 name        = login_box
 template    = base_box::login_box
 weight      = 1
 title       = Login
 is_secure   = no
 action_type = template_only
 
 # In code, find the action...
 
 my $action = CTX->lookup_action( 'login_box' );
 
 # And execute as normal!
 
 my $box_content = $action->execute;

 # You can also instantiate the action directly
 my $action = CTX->lookup_action( 'template_only' );
 
 # ...set the parameter
 $action->param( template => 'base_box::login_box' );
 
 # ...and execute as normal
 return $action->execute;

DESCRIPTION ^

This class implements the template_only action type. What this means is that your action declaration can specify that it is of this type and most of the work is done for you.

COPYRIGHT ^

Copyright (c) 2002-2005 Chris Winters. All rights reserved.

AUTHORS ^

Chris Winters <chris@cwinters.com>