ePages 6.11.0 - DE_EPAGES/SourceDoc/API/Perl.pm

Package DE_EPAGES::SourceDoc::API::Perl

Builds source code documentation for Perl files.

Base
DE_EPAGES::SourceDoc::API::BaseLanguage

Functions

SaveBase
SaveDerivative
SaveExtractedExport
SaveExtractedImport
SaveGlobal
SaveName
SavePackage
SaveParam
SaveProject
SaveState
parseFile

SaveBase

Saves the base package of Perl package as Content tag.

Syntax
$self->SaveBase( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs,
-1 for do not save the parent of this element, else 1

SaveDerivative

Saves the derivative package of Perl package as Content tag.

Syntax
$self->SaveDerivative( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs,
-1 for do not save the parent of this element, else 1

SaveExtractedExport

Saves exported functions extracted from the source code (Name)
Only the exports listed in front of the first function are considered.

Syntax
$self->SaveExtractedExport( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs, else 1

SaveExtractedImport

Saves the list of imported modules, functions and variables
Only the imports listed in front of the first function are considered.
Considers require, use ans uselocal.
The require <Version-Number> info will be saved together with the module.

Syntax
$self->SaveExtractedImport( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the function parameters
Return
0 for do not save this element and all childs, else 1

SaveGlobal

Saves global variable parameters from variables described in comments as Name, Description and DataType keys.

Syntax
$self->SaveGlobal( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs, else 1

SaveName

Saves package and function names

Syntax
$self->SaveName( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs, else 1

SavePackage

Saves package and function names

Syntax
$self->SavePackage( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs, else 1

SaveParam

Saves function params as Name, Description an DataType

Syntax
$self->SaveParam( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs, else 1

SaveProject

Saves the project of an entry as Project and Description key
If it is no or another project than this in the flags no data are stored.
If the parent is a function or global variable the name is also deleted from the export lists.
Because of some tags (e.g ) does not have a §state tag additional checks must be made while storing the names of these tags.

Syntax
$self->SaveProject( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs,
-1 for do not save the parent of this element, else 1

SaveState

Saves the state of an entry as Content tag
If it is an private entry and only public data are required the parent of the state tag is deleted.
If the parent is a function or global variable the name is also deleted from the export lists.

Syntax
$self->SaveState( $hBlock, $hResult )
Input
$hBlock
block to save
Output
$hResult
will be filled with the content of the tag

all unused charakters are removed from the content
Return
0 for do not save this element and all childs,
-1 for do not save the parent of this element, else 1

parseFile

Parses a single Perl file and returns the syntax tree as TLE hash. Returns undef if the file contains no documentation.

Syntax
$hVars = parseFile( $FileName );
Input
$FileName (string)
Perl file name
Return
$hVars (hash ref)
TLE hash