NaturalDocs:: Settings

A package to handle the command line and various other program settings. 

Usage and Dependencies

Summary
A package to handle the command line and various other program settings.
The input directory.
The project directory.
A hash of the output formats and directories being used.
Whether the script should rebuild all data files from scratch.
Whether the script should rebuild all output files from scratch.
Whether the script should be run in quiet mode or not.
The style to be used if an output format doesn’t have its own style specified.
A hash of the output format styles.
Parses and validates the command line.
Prints the syntax reference.
Returns the input directory.
Returns the output directory of an output format.
Returns a hashref of the output formats and their directories.
Returns the style associated with an output format.
Returns the project directory.
Returns the main style directory.
Returns whether the script should rebuild all data files from scratch.
Returns whether the script should rebuild all output files from scratch.
Returns whether the script should be run in quiet mode or not.
Returns Natural Docs’ version number as an integer.
Returns Natural Docs’ version number as plain text.
Returns a string of the project’s current web address.

Variables

inputDirectory

my $inputDirectory

The input directory. 

projectDirectory

my $projectDirectory

The project directory. 

outputFormats

my %outputFormats

A hash of the output formats and directories being used.  The keys are the package names, and the values are their corresponding directories. 

rebuildData

my $rebuildData

Whether the script should rebuild all data files from scratch. 

rebuildOutput

my $rebuildOutput

Whether the script should rebuild all output files from scratch. 

isQuiet

my $isQuiet

Whether the script should be run in quiet mode or not. 

defaultOutputStyle

my $defaultOutputStyle

The style to be used if an output format doesn’t have its own style specified. 

outputStyles

my %outputStyles

A hash of the output format styles.  The keys are the package names, and the values are the style strings.  If a package does not have an entry in this hash, it uses defaultOutputStyle

Functions

ParseCommandLine

sub ParseCommandLine

Parses and validates the command line.  Will cause the script to exit if the options ask for the syntax reference or are invalid.  Needs to be run before calling any other functions in this package. 

PrintSyntax

sub PrintSyntax

Prints the syntax reference. 

InputDirectory

sub InputDirectory

Returns the input directory. 

OutputDirectory

sub OutputDirectory #(package)

Returns the output directory of an output format. 

Parameters

packageThe output package. 

Returns

The output format directory, or undef if the format wasn’t specified. 

OutputFormats

sub OutputFormats

Returns a hashref of the output formats and their directories.  The keys are the package names, and the values are their directories.  The hashref is not a copy of the data, so don’t change it. 

OutputStyle

sub OutputStyle #(package)

Returns the style associated with an output format. 

Parameters

packageThe output package. 

Returns

The style string. 

ProjectDirectory

sub ProjectDirectory

Returns the project directory. 

StyleDirectory

sub StyleDirectory

Returns the main style directory. 

RebuildData

sub RebuildData

Returns whether the script should rebuild all data files from scratch. 

RebuildOutput

sub RebuildOutput

Returns whether the script should rebuild all output files from scratch. 

IsQuiet

sub IsQuiet

Returns whether the script should be run in quiet mode or not. 

Constant Functions

AppVersion

sub AppVersion

Returns Natural Docs’ version number as an integer.  Use TextAppVersion() to get a printable version. 

TextAppVersion

sub TextAppVersion

Returns Natural Docs’ version number as plain text. 

AppURL

sub AppURL

Returns a string of the project’s current web address.