NAME
WebService::AbuseIPDB::Category - Category names and numbers for WebService::AbuseIPDB
SYNOPSIS
use WebService::AbuseIPDB::Category;
my $cat = WebService::AbuseIPDB::Category->new (18);
print $cat->name;
$cat = WebService::AbuseIPDB::Category->new ('Web App Attack');
print $cat->id;
DESCRIPTION
This class stores a list of category IDs and names for use with WebService::AbuseIPDB.
METHODS
new
my $catobj = WebService::AbuseIPDB::Category->new ($category)
The constructor takes one argument which is the category to be instantiated. This should be either the number of the category or the name of the category. If called with an existing category object it will return that same object as a no-op. If you would prefer a copy of the object then call it with the name or number instead. eg.
my $catcopy = WebService::AbuseIPDB::Category->new ($catobj->id)
id
my $id = $catobj->id;
printf "%i\n", $id;
A method for returning the numerical ID of the category.
name
my $name = $catobj->name;
printf "%s\n", $name;
A method for returning the name of the category.
AUTHOR
Pete Houston, <cpan at openstrike.co.uk>
SEE ALSO
WebService::AbuseIPDB, https://www.abuseipdb.com/categories
LICENCE AND COPYRIGHT
Copyright © 2020 Pete Houston
This program 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; version 2 dated June, 1991 or at your option any later version.
This program 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.
A copy of the GNU General Public License is available in the source tree; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA