App::Requirement::Arch::HTML::Flat - Generate a "flat" HTML document from a requirement structure
use App::Requirements::Arch::HTML::Flat ; use App::Requirements::Arch::Filter ; my ($requirements_structure, $requirements, $categories) = load_and_filter_requirements( ...) ; keep_abstraction_level_requirements($requirements, @keep_abstraction_level) ; my $html_document = generate_flat_html_document($requirements, $title, $header, $comment) ;
This module provides functionality to generate a 'flat' (as opossed to the hierarchical structure used when developing requirements) HTML requirements document to be read by users not part of the requirements development.
Generate a 'flat' HTML requirements document. After transforming the requirements structure to a flat structure. Useful for reviews with reviwers that are not used to structured hierarchical requirement visualisation.
Arguments
\%requirements - A reference to the requirements stucture to process.
$title - The title of the generated HTML document.
$header - header to put in generated HTML document below the title.
$comment - Comment to add to the source of the generated HTML document. Will not be visible in a browser.
Returns
item * $html_page - A HTML page.
Generate a 'flat' HTML requirements document.
%flat_document_structure - A reference to a structure to be used to generate the HTML document
\%requirements - A reference to a hash containing requirements
$title - The title of the generated HTML document
$header - A string which will be inserted as-is in the HTML document, under the title
$comment - A string that is inserted as a comment
$html - A string containing the HTML document
Transform text elements to their HTML equivalent
$string_to_htmlize
$html - transformed text
Walks the flat requirement structur structure, for each category, and calls the passed subs
\%flat_document_structure - The flat document strucure generated by 'generate_flat_document_structure'.
\%requirements - The actual requirements. Needed as the flat requirements structure only reference data in this structure.
\&process_category - A sub called on each category
\&process_requirement- A sub called on each requirement within the category
A text string containing all generated data.
Walks the requirements structure and apply a sub to each requirement
\%requirements - The requirements.
\&process_requirements - Reference to a sub that will be applied to each requirements.
$header_level - The header level to use.
$parent_path - The path to the current requirement
Return
$header_level - The level of the category
$category, - The name of the category
$index - uniq index for the category
A string containing a HTML link for the category
Generates HTML for a category.
A string containing a HTML representation for the category
This function will be called once per requirement, and subrequirements, to generate anHTML link.
\%requirements - The requirements structre.
$requirement_name - The name of the requirement.
$header_level - The level of the requirement.
$parent_path - A string reprecenting the path to the requirement.
$current_id - The id of the current requirement.
This function is called for each requirement, and subrequirements, to generate a HTML representation of the requirement.
$header_level - The header level.
A string containing a HTML representation for the requirement.
Tags over <h6>, this would be a problem if we generate the whole requirement structure as we have more than 6 level of requirement breakdown.
Khemir Nadim ibn Hamouda. Ian Kumlien
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
To install App::Requirement::Arch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Requirement::Arch
CPAN shell
perl -MCPAN -e shell install App::Requirement::Arch
For more information on module installation, please visit the detailed CPAN module installation guide.