Test::Presenter::QueryTemplate - A submodule for Test::Presenter This module provides methods for opening and inputting both Template and Configuration files. The loaded files are then "merged" to create DBXml queries.
$report->open_template("/path/to/template/files", "report.tmpl"); or $report->open_template("report"); $report->open_config("/path/to/config/file", "report.config"); $report->process(); $report->query_with_template("doc_name"); $report->save_query("/path/to/saved/query", "filename.query"); $report->load_query("/path/to/loaded/query", "filename.query");
Test::Presenter::QueryTemplate is a helper module to give Test::Presenter the ability to query a DBXml Container with the use of preexisting Query Template files and a configured Query Configuration file.
Purpose: Read the Template file into the 'template' variable. Input: Template Path, Template Filename Output: 1
Purpose: Read the Configuration file into the 'config' variable. Input: Configuration Path, Configuration Filename Output: 1
Purpose: Merge the Configuration and Template files to produce Query Script. The Query Script is then stored in the 'queries' variable. Input: NA Output: 1
Purpose: Execute the Query Script on the DBXml object. After being executed, the results will be pushed into the 'component' object. Input: NA Output: 1
Purpose: To save the processed query script to a file so that it may be used later Input: Pathname and Filename Output: 1 or undef
Purpose: To load a processed query script from a file Input: Pathname and Filename Output: 1 or undef
To install Test::Presenter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Presenter
CPAN shell
perl -MCPAN -e shell install Test::Presenter
For more information on module installation, please visit the detailed CPAN module installation guide.