Commit 71a64f93 authored by sikeda's avatar sikeda
Browse files

[dev] Added PODs to several modules.

git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@11093 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 0a5cc56d
......@@ -80,8 +80,12 @@ nobase_modules_DATA = \
man3dir = $(mandir)/man3
man3ext = 3Sympa
MAN3PM = \
Sympa/ConfDef.pm \
Sympa/Constants.pm \
Sympa/Crash.pm \
Sympa/DatabaseDescription.pm \
Sympa/Language.pm \
Sympa/ListDef.pm \
Sympa/LockedFile.pm \
Sympa/ModDef.pm \
Sympa/Regexps.pm \
......
......@@ -29,28 +29,6 @@ use warnings;
use Sympa::Constants;
## This defines the parameters to be edited :
## title : Title for the group of parameters following
## name : Name of the parameter
## file : Conf file where the parameter is defined. If omitted, the
## parameter won't be added automatically to the config file, even
## if a default is set.
## "wwsympa.conf" is a synonym of "sympa.conf". It remains there
## in order to migrating older versions of config.
## default: Default value : DON'T SET AN EMPTY DEFAULT VALUE ! It's useless
## and can lead to errors on fresh install.
## gettext_id : Description of the parameter
## gettext_comment : Additionnal advice concerning the parameter
## sample : FIXME FIXME
## edit : 1|0: FIXME FIXME
## optional: 1|0: FIXME FIXME
## vhost : 1|0 : if 1, the parameter can have a specific value in a
## virtual host
## db : 'db_first', 'file_first', 'no'
## obfuscated: 1|0: FIXME FIXME
## multiple: 1|0: If 1, the parameter can have mutiple values. Default is 0.
## scenario: 1|0: If 1, the parameter is the name of scenario
our @params = (
{'gettext_id' => 'Site customization'},
......@@ -1544,3 +1522,106 @@ our @params = (
);
1;
__END__
=encoding utf-8
=head1 NAME
Sympa::ConfDef - Definition of site and robot configuration parameters
=head1 DESCRIPTION
This module keeps definition of configuration parameters for site default
and each robot.
=head2 Global variable
=over
=item @params
Includes following items in order parameters are shown.
=over
=item C<{ gettext_id =E<gt> TITLE }>
Title for the group of parameters following.
=item C<{ name =E<gt> NAME, DEFINITIONS, ... }>
Definition of parameter. DEFINITIONS may contain following pairs.
=over
=item name =E<gt> NAME
Name of the parameter.
=item file =E<gt> FILE
Conf file where the parameter is defined. If omitted, the
parameter won't be added automatically to the config file, even
if a default is set.
C<"wwsympa.conf"> is a synonym of C<"sympa.conf">. It remains there
in order to migrating older versions of config.
=item default =E<gt> VALUE
Default value.
DON'T SET AN EMPTY DEFAULT VALUE! It's useless
and can lead to errors on fresh install.
=item gettext_id =E<gt> STRING
Description of the parameter.
=item gettext_comment =E<gt> STRING
Additionnal advice concerning the parameter.
=item sample =E<gt> STRING
FIXME FIXME
=item edit =E<gt> 1|0
This defines the parameters to be edited.
=item optional =E<gt> 1|0
FIXME FIXME
=item vhost =E<gt> 1|0
If 1, the parameter can have a specific value in a
virtual host.
=item db =E<gt> OPTION
'db_first', 'file_first' or 'no'.
=item obfuscated =E<gt> 1|0
FIXME FIXME
=item multiple =E<gt> 1|0
If 1, the parameter can have mutiple values. Default is 0.
=item scenario =E<gt> 1|0
If 1, the parameter is the name of scenario.
=back
=back
=back
=head1 SEE ALSO
L<sympa.conf(5)>, L<robot.conf(5)>.
=cut
......@@ -51,3 +51,17 @@ use constant ARCDIR => '--arcdir--';
use constant BOUNCEDIR => '--bouncedir--';
1;
__END__
=encoding utf-8
=head1 NAME
Sympa::Constants - Definition of constants
=head1 DESCRIPTION
This module keeps definition of constants used by Sympa software.
=cut
......@@ -1025,7 +1025,6 @@ sub full_db_struct {
## mediumblob : Binary data with length upto 2^24 - 3 o.
sub db_struct {
my %db_struct;
my %full_db_struct = full_db_struct();
......@@ -1156,3 +1155,146 @@ our @former_indexes = (
);
1;
__END__
=encoding utf-8
=head1 NAME
Sympa::DatabaseDescription
=head1 DESCRIPTION
This module keeps structure of database used by Sympa software.
=head2 Functions
=over
=item full_db_struct ()
I<Function>.
Returns a heshref containing definitions of all tables.
Each item has the name of table as key and definition as value.
Each definition is hashref containig following keys:
=over
=item fields
=item doc
=item order
=back
C<fields> item is hasref which may contain following items.
=over
=item struct
Column data types. Types are based on MySQL.
Following types are recognized:
=over
=item varchar(X)
Text with length upto X. X must be lower than 2^16 - 2.
=item int(1)
Boolean, 1 or 0.
=item int(11)
Unix time (a.k.a. "epoch").
=item int(X)
Integer with columns upto X, -2^31 to 2^31 - 1.
=item tinyint
Integer, -2^7 to 2^7 - 1.
=item smallint
Integer, -2^15 to 2^15 - 1.
=item bigint
Integer, -2^63 to 2^63 - 1.
=item double
IEEE floating point number, 8 bytes.
=item enum
Keyword with length upto 20 o.
=item text
Text with length upto 500 o.
=item longtext
Text with length upto 2^32 - 4 o.
=item datetime
Timestamp.
=item mediumblob
Binary data with length upto 2^24 - 3 o.
=back
=item doc
XXX
=item primary
XXX
=item not_null
XXX
=back
=item db_struct ()
I<Function>.
Returns a hashref definition by all types of RDBMS Sympa supports.
Keys are types and values are definition with their field types
converted according to types.
=item not_null ()
I<Function>.
XXX
=item autoincrement ()
I<Function>.
XXX
=item primary ()
I<Function>.
XXX
=back
=head1 SEE ALSO
L<SDM>.
=cut
......@@ -58,41 +58,6 @@ my %alias = (
'max-size' => 'max_size'
);
##############################################################
## This hash COMPLETELY defines ALL list parameters
## It is then used to load, save, view, edit list config files
##############################################################
## List parameters format accepts the following keywords :
## format : Regexp aplied to the configuration file entry;
## some common regexps are defined in %regexp
## file_format : Config file format of the parameter might not be
## the same in memory
## split_char: Character used to separate multiple parameters
## length : Length of a scalar variable ; used in web forms
## scenario : tells that the parameter is a scenario, providing its name
## default : Default value for the param ; may be a configuration
## parameter (conf)
## synonym : Defines synonyms for parameter values (for compatibility
## reasons)
## gettext_unit :Unit of the parameter ; this is used in web forms and refers
## to translated
## strings in PO catalogs
## occurrence : Occurerence of the parameter in the config file
## possible values: 0-1 | 1 | 0-n | 1-n
## example : a list may have multiple owner
## gettext_id : Title reference in NLS catalogues
## description : deescription text of a parameter
## group : Group of parameters
## obsolete : Obsolete parameter ; should not be displayed
## nor saved
## obsolete_values : defined obsolete values for a parameter
## these values should not get proposed on the web interface
## edition form
## order : Order of parameters within paragraph
## internal : Indicates that the parameter is an internal parameter
## that should always be saved in the config file
## field_type : used to select passwords web input type
###############################################################
our %pinfo = (
### Global definition page ###
......@@ -2209,3 +2174,124 @@ sub cleanup {
}
1;
__END__
=encoding utf-8
=head1 NAME
Sympa::ListDef - Definition of list configuration parameters
=head1 DESCRIPTION
This module keeps definition of configuration parameters for each list.
=head2 Global variable
=over
=item %pinfo
This hash COMPLETELY defines ALL list parameters.
It is then used to load, save, view, edit list config files.
List parameters format accepts the following keywords :
=over
=item format
Regexp aplied to the configuration file entry;
some common regexps are defined in L<Sympa::Regexps>.
If the parameter is paragraph, value of this item is a hashref containing
definitions of sub-parameters.
=item file_format
Config file format of the parameter might not be
the same in memory.
=item split_char
Character used to separate multiple parameters.
=item length
Length of a scalar variable ; used in web forms.
=item scenario
Tells that the parameter is a scenario, providing its name.
=item default
Default value for the param ; may be a robot configuration
parameter (conf).
=item synonym
Defines synonyms for parameter values (for compatibility
reasons).
=item gettext_unit
Unit of the parameter ; this is used in web forms and refers
to translated
strings in NLS catalogs.
=item occurrence
Occurrence of the parameter in the config file
possible values: C<0-1>, C<1>, C<0-n> and C<1-n>.
Example: A list may have multiple owner.
=item gettext_id
Title reference in NLS catalogs.
=item gettext_comment
Deescription text of a parameter.
=item group
Group of parameters.
=item obsolete
Obsolete parameter ; should not be displayed
nor saved.
=item obsolete_values
Defined obsolete values for a parameter.
These values should not get proposed on the web interface
edition form.
=item order
Order of parameters within paragraph.
=item internal
Indicates that the parameter is an internal parameter
that should always be saved in the config file.
=item field_type
Used to select passwords web input type.
=back
=item @param_order
XXX
=back
=head1 SEE ALSO
L<config(5)>.
=cut
......@@ -22,32 +22,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
=encoding utf-8
=head1 NAME
Sympa::ModDef - Definition of dependent modules
=head1 DESCRIPTION
This module keeps definition of modules required by Sympa.
=cut
package Sympa::ModDef;
use strict;
use warnings;
use English qw(-no_match_vars);
## This defines the modules :
## required_version : Minimum version of package.
## Assume required_version = 1.0 if not specified.
## package_name : Name of CPAN module.
## mandatory : 1|0: if 1, the module is mandatory. Default is 0.
## gettext_id : Usage of this package,
## gettext_comment : Description of prerequisites if any.
our %cpan_modules = (
'Archive::Zip' => {
required_version => '1.05',
......@@ -387,3 +367,58 @@ $cpan_modules{'Unicode::CaseFold'} = {
if 5.008 < $] and $] < 5.016;
1;
__END__
=encoding utf-8
=head1 NAME
Sympa::ModDef - Definition of dependent modules
=head1 DESCRIPTION
This module keeps definition of modules required by Sympa.
=head2 Global variable
=over
=item %cpan_modules
This defines the modules.
Each item has Perl package name as key and hashref containing pairs below
as value.
=over
=item required_version =E<gt> STRING
Minimum version of package.
Assume required_version = '1.0' if not specified.
=item package_name =E<gt> STRING
Name of CPAN module.
=item mandatory =E<gt> 1|0
If 1, the module is mandatory. Default is 0.
=item gettext_id =E<gt> STRING
Usage of this package,
=item gettext_comment =E<gt> STRING
Description of prerequisites if any.
=back
=back
=head1 SEE ALSO
sympa_wizard(1).
=cut
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment