NAME

Mail::LMLM - List of Mailing Lists Manager

VERSION

version 0.6807

SYNOPSIS

use Mail::LMLM;

my $renderer =
    Mail::LMLM->new(
        'extra-classes' => \%extra_mailing_list_classes,
        title => "List of the Foo Mailing Lists",
        headline => "Foo Mailing Lists",
        lists => \@lists,
        prolog =>  \&prolog,
        epilog => \&epilog,
    );

$renderer->render();

DESCRIPTION

The Mail::LMLM module allows users to easily manage HTML directories of mailing lists of various mailing list managers and hosts.

To use it create a new module of type Mail::LMLM with a new method, while initializing it with the list of mailing lists (in order of listing), and other parameters. Then, invoke the render() function to create the HTML files within the current directory.

Following is a listing of the parameters

title and headline

title is what will be displayed in the document inside the <title> tag. headline is the headline of the main page.

prolog and epilog

prolog is a callback for a function that will be called with the Mail::LMLM handle and its appropriate rendering back-end when the main's page prologue (that comes before the listing itself) is to be displayed. epilog is the same for the text after the listing itself. Here is an example for it:

sub prolog
{
    my $self = shift;
    my $main_r = shift;

    $main_r->para( "This is a list of the mailing-lists which are affiliated " .
        "with the Israeli Group of Linux Users (IGLU). It includes such " .
        "information as how to subscribe/unsubscribe, posting address, " .
        "posting guidelines, the address of the mailing-list owner, the " .
        "mailing-list's homepage and the online messages archive."
    );

    $main_r->start_para();
    $main_r->text("If you have any comments, suggestions or additions " .
        "regarding the information contained here, don't hesitate to " .
        "contact the maintainer of these pages at the following e-mail: ");

    $main_r->email_address("shlomif", "shlomifish.org");
    $main_r->end_para();
}

For more information on how to interface with the renderer consult the HTML::LMLM::Render reference page.

extra-classes

This is a reference to a hash whose keys are extra IDs for mailing lists classes, and its values are either the namespace of the Perl module that implements this class, or a subroutine that creates a new class like that.

This class would be better be sub-classed from one of the classes that ship with Mail::LMLM. To see examples of how to sub-class, consult the examples section of the Mail::LMLM distribution.

lists

This is a reference to an array of hash references that contain the information for the mailing lists. The fields available here are:

id

The identifier of the mailing list that will be used as the base name for its HTML page.

class

The class of the mailing list that determines its type. Available built-in classes are: egroups (A Yahoo-Groups mailing list), ezmlm (an Ezmlm-based mailing list), listar (a Listar-based mailing list), listserv ( a Listserv-based mailing list), mailman (a mailman based mailing list), majordomo (a majordomo-based mailing list).

group_base

The group base that appears before the host.

title

The title that will be displayed at the head of the page.

hostname

The hostname of the mailing list address.

homepage

The homepage URL of the mailing list.

description

The description of the mailing list, to be presented in its page.

This can be an handle/Mail::LMLM::Render callback.

guidelines

The posting guidelines for the mailing list.

online_archive

A URL or a Mail::LMLM::Render callback for displaying the online archive of the mailing list.

FUNCTIONS

initialize()

Called on behalf of the constructor to initialize the module. For internal use only.

my $lmlm = Mail::LMLM->new(%params)

Initializes a new module with %params.

$lmlm->render()

Renders the pages.

SEE ALSO

Mail::LMLM::Render,1

AUTHOR

Shlomi Fish, http://www.shlomifish.org/

LICENSE

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

(This is the MIT X11 License).

SUPPORT

Websites

The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.

Bugs / Feature Requests

Please report any bugs or feature requests by email to bug-mail-lmlm at rt.cpan.org, or through the web interface at https://rt.cpan.org/Public/Bug/Report.html?Queue=Mail-LMLM. You will be automatically notified of any progress on the request by the system.

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

https://github.com/shlomif/perl-mail-lmlm

git clone git://github.com/shlomif/perl-mail-lmlm.git

AUTHOR

Shlomi Fish

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/shlomif/perl-mail-lmlm/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

COPYRIGHT AND LICENSE

This software is Copyright (c) 2020 by Shlomi Fish.

This is free software, licensed under:

The MIT (X11) License