The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

HTML::Template::Associate::FormValidator

SYNOPSIS

  This class is not intended to be used directly but rather through a 
  HTML::Template::Associate. It provides concrete class functionality, it
  will take HTML::FormValidator::Results object and reconstruct data structure
  to one appropriate for use by the HTML::Template. 

  The following will become available to your associate object/template:

  Key          /                    Perl                /           Template

  Arrays / Loops

  VALID_FIELDS     / $associate->param(q{VALID_FIELDS});     / <TMPL_LOOP NAME=VALID_FIELDS>
  MISSING_FIELDS   / $associate->param(q{MISSING_FIELDS});   / <TMPL_LOOP NAME=MISSING_FIELDS>   
  INVALID_FIELDS   / $associate->param(q{INVALID_FIELDS});   / <TMPL_LOOP NAME=INVALID_FIELDS>
  UNKNOWN_FIELDS   / $associate->param(q{UNKNOWN_FIELDS});   / <TMPL_LOOP NAME=UNKNOWN_FIELDS>
  WARNINGS_FIELDS  / $associate->param(q{WARNINGS_FIELDS});  / <TMPL_LOOP NAME=WARNINGS_FIELDS>
  CONFLICTS_FIELDS / $associate->param(q{CONFLICTS_FIELDS}); / <TMPL_LOOP NAME=CONFLICTS_FIELDS>              
  Variables  

  VALID_ParamA     / $associate->param(q{VALID_ParamA});     / <TMPL_VAR NAME=VALID_ParamA>
  MISSING_ParamB   / $associate->param(q{MISSING_ParamB});   / <TMPL_VAR NAME=MISSING_ParamB>
  INVALID_ParamC   / $associate->param(q{INVALID_ParamC});   / <TMPL_VAR NAME=INVALID_ParamC>
  UNKNOWN_ParamD   / $associate->param(q{UNKNOWN_ParamD});   / <TMPL_VAR NAME=UNKNOWN_ParamD>
  WARNINGS_ParamE  / $associate->param(q{WARNINGS_ParamE});  / <TMPL_VAR NAME=WARNINGS_ParamE>
  CONFLICTS_ParamF / $associate->param(q{CONFLICTS_ParamF}); / <TMPL_VAR NAME=CONFLICTS_ParamF> 
   

  Inside Array / Loops we have the following structure:

  Perl

  VALID_FIELDS => [ { FIELD_NAME => X }, FIELD_VALUE => Y }, ... ]

  Template

  <TMPL_LOOP NAME=VALID_FIELDS>
        <TMPL_VAR NAME=FIELD_NAME> 
        <TMPL_VAR NAME=FIELD_VALUE>     
  </TMPL_LOOP>   

  For further explanation on what the VALID,MISSING,INVALID,UNKNOWN,WARNINGS and CONFLICTS are
  please refer to HTML::FormValidator::Results.  

DESCRIPTION

 Map HTML::FormValidator::Results object into a form suitable for use by HTML::Template

USAGE

 See above.

BUGS

 If you find any please report to author.

SUPPORT

 See License.

AUTHOR

        Alex Pavlovic
        alex@taskforce-1.com
        http://www.taskforce-1.com

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

HTML::Template::Associate perl(1).

init

 Usage     : $associate->init ( $results, $extra_arguments );
 Purpose   : Initiliazes the object
 Returns   : concrete object instance
 Argument  : HTML::FormValidator::Results instance and extra hash of arguments passed to factory    
 Comments  : Factory class will call this method automatically during concrete object construction
           : Error is thrown depending whether the passed in results object is of correct type

See Also : HTML::Template::Associate HTML::FormValidator::Results

param

 Usage     : $associate->param ( $field, $value );
 Purpose   : Sets or returns the proper variable or loop structure, suitable for HTML::Template to use 
 Returns   : Value of the param  
 Argument  : Field name to find and optional value to set for that field if field was to be found
 Comments  : This method is called by HTML::Template once associate object is passed to it

See Also : HTML::Template::Associate HTML::FormValidator::Results

runloop

 Usage     : used internally to assign various prefixes/names to variables and loops