<<

Bugzilla::Install::Requirements

NAME

Bugzilla::Install::Requirements - Functions and variables dealing with Bugzilla's perl-module requirements.

DESCRIPTION

This module is used primarily by checksetup.pl to determine whether or not all of Bugzilla's prerequisites are installed. (That is, all the perl modules it requires.)

CONSTANTS

REQUIRED_MODULES

An arrayref of hashrefs that describes the perl modules required by Bugzilla. The hashes have two keys, name and version, which represent the name of the module and the version that we require.

SUBROUTINES

check_requirements($output)
 Description: This checks what optional or required perl modules
              are installed, like C<checksetup.pl> does.

 Params:      C<$output> - C<true> if you want the function to print
                           out information about what it's doing,
                           and the versions of everything installed.
                           If you don't pass the minimum requirements,
                           the will always print out something, 
                           regardless of this parameter.

 Returns:    A hashref containing three values:
             C<pass> - Whether or not we have all the mandatory 
                       requirements.
             C<missing> - A hash showing which mandatory requirements
                          are missing. The key is the module name,
                          and the value is the version we require.
             C<optional> - Which optional modules are installed and
                           up-to-date enough for Bugzilla.
check_graphviz($output)

Description: Checks if the graphviz binary specified in the webdotbase parameter is a valid binary, or a valid URL.

Params: $output - $true if you want the function to print out information about what it's doing.

Returns: 1 if the check was successful, 0 otherwise.

vers_cmp($a, $b)
 Description: This is a comparison function, like you would use in
              C<sort>, except that it compares two version numbers.
              It's actually identical to versioncmp from 
              L<Sort::Versions>.

 Params:      c<$a> and C<$b> are versions you want to compare.

 Returns:     -1 if $a is less than $b, 0 if they are equal, and
              1 if $a is greater than $b.
have_vers($module, $output)
 Description: Tells you whether or not you have the appropriate
              version of the module requested. It also prints
              out a message to the user explaining the check
              and the result.

 Params:      C<$module> - A hashref, in the format of an item from 
                           L</REQUIRED_MODULES>.
              C<$output> - Set to true if you want this function to
                           print information to STDOUT about what it's
                           doing.

 Returns:   C<1> if you have the module installed and you have the
            appropriate version. C<0> otherwise.
install_command($module)
 Description: Prints out the appropriate command to install the
              module specified, depending on whether you're
              on Windows or Linux.

 Params:      C<$module> - A hashref, in the format of an item from
                           L</REQUIRED_MODULES>.

 Returns:     nothing

<<