Provided by: sympa_6.2.24~dfsg-1_amd64 bug

NAME

       Sympa::Aliases - Base class for alias management

SYNOPSIS

         package Sympa::Aliases::FOO;

         use base qw(Sympa::Aliases);

         sub check { ... }
         sub add { ... }
         sub del { ... }

         1;

DESCRIPTION

       This module is the base class for subclasses to manage list aliases of Sympa.

   Methods
       new ( $type, [ key => value, ... ] )
           Constructor.  Creates new instance of Sympa::Aliases.

           Returns one of appropriate subclasses according to $type:

           'none'
               No aliases management.

           Full path to executable
               Use external program to manage aliases.  See Sympa::Aliases::External.

           Name of subclass
               Use a subclass "Sympa::Aliases::name" to manage aliases.

           For invalid types returns "undef".

           Optional "key => value" pairs are included in the instance as hash entries.

       check ($listname, $robot_id)
           Instance method, overridable.  Checks if the addresses of requested list exist
           already.

           Parameters:

           $listname
               Name of the list.

           $robot_id
               List's robot.

           Returns:

           True value if one of addresses exists.  0 if none found.  "undef" if something wrong
           happened.

           By default, this method always returns 0.

       add ($list)
           Instance method, overridable.  Installs aliases for the list $list.

           Parameters:

           $list
               An instance of Sympa::List.

           Returns:

           1 if installation succeeded.  0 if there were no aliases to be installed.  "undef" if
           not applicable.

           By default, this method always returns 0.

       del ($list)
           Instance method, overridable.  Removes aliases for the list $list.

           Parameters:

           $list
               An instance of Sympa::List.

           Returns:

           1 if removal succeeded.  0 if there were no aliases to be removed.  "undef" if not
           applicable.

           By default, this method always returns 0.

SEE ALSO

       Sympa::Aliases::CheckSMTP, Sympa::Aliases::External, Sympa::Aliases::Template.

HISTORY

       alias_manager.pl as a program to automate alias management appeared on Sympa 3.1b.13.

       Sympa::Aliases module as an OO-based class appeared on Sympa 6.2.23b, and it obsoleted
       alias_manager.pl.