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


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



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



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.


Alceu Rodrigues de Freitas Junior, <>


This software is copyright (c) 2018 of Alceu Rodrigues de Freitas Junior, <>

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 <>.