The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::SpamcupNG::Error::Factory - factory design pattern to create new instances of errors parsed from Spamcop website HTML.

SYNOPSIS

    use App::SpamcupNG::Error::Factory qw(create_error);

DESCRIPTION

EXPORTS

The function create_error is the only things exported by this module.

FUNCTIONS

create_error

Creates new error from a given message string.

The type of error is identified from this message.

Expects as parameters:

- an array reference where each index is a string line from the original error message.

- a integer, being 0 if the error message is not fatal, 1 otherwise.

Returns an instance of App::SpamcupNG::Error or one of it's subclasses.

AUTHOR

Alceu Rodrigues de Freitas Junior, <glasswalk3r@yahoo.com.br>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 of Alceu Rodrigues de Freitas Junior, <glasswalk3r@yahoo.com.br>

This file is part of App-SpamcupNG distribution.

App-SpamcupNG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

App-SpamcupNG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with App-SpamcupNG. If not, see <http://www.gnu.org/licenses/>.