NAME
Robots::Validate - Validate that IP addresses are associated with known robots
SYNOPSIS
use Robots::Validate;
my $rv = Robots::Validate->new;
...
if ( my $res = $rs->validate( $ip, $user_agent ) ) {
...
}
DESCRIPTION
This module allows one to validate a robot user-agent string against the IP addresses.
RECENT CHANGES
Changes for version v0.3.1 (2026-08-23)
- Documentation
- Fixed error in Changes.
See the Changes file for more details.
REQUIREMENTS
This module lists the following modules as runtime dependencies:
- Algorithm::AhoCorasick::XS
- File::ShareDir
- File::Slurper
- List::Util
- Moo version 1 or later
- Net::DNS::Resolver
- Net::IP
- Net::Patricia
- Ref::Util
- Sub::Util version 1.40 or later
- Syntax::Keyword::Try
- TOML::XS
- Types::Common
- experimental
- namespace::autoclean
- perl version v5.24.0 or later
See the cpanfile file for the full list of prerequisites.
INSTALLATION
The latest version of this module (along with any dependencies) can be installed from CPAN with the cpan tool that is included with Perl:
cpan Robots::Validate
You can also extract the distribution archive and install this module (along with any dependencies):
cpan .
You can also install this module manually using the following commands:
perl Makefile.PL
make
make test
make install
If you are working with the source repository, then it may not have a Makefile.PL file. But you can use the Dist::Zilla tool in anger to build and install this module:
dzil build
dzil test
dzil install --install-command="cpan ."
For more information, see How to install CPAN modules.
SECURITY CONSIDERATIONS
When using the "cache", ensure that it is configured to expire the data and digest the keys by setting "max_key_length" in CHI to 0. This is to keep the cache from growing too large, and to reduce the likelihood of cache backend vulnerabilities being exploited through user-agent strings.
SUPPORT
Only the latest version of this module will be supported.
This module requires Perl v5.24 or later, based on the minimum Perl supported by Dist::Zilla.
Reporting Bugs and Submitting Feature Requests
Please report any bugs or feature requests on the bugtracker website https://github.com/robrwo/Robots-Validate/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.
If the bug you are reporting has security implications which make it inappropriate to send to a public issue tracker,
then see SECURITY.md for instructions how to report security vulnerabilities.
SOURCE
The development version is on github at https://github.com/robrwo/Robots-Validate and may be cloned from https://github.com/robrwo/Robots-Validate.git
AUTHOR
Robert Rothenberg perl@rhizomnic.com
Some of the development of this module was sponsored by Science Photo Library https://www.sciencephoto.com.
CONTRIBUTOR
Robert Rothenberg rrwo@cpan.org
COPYRIGHT AND LICENSE
This software is Copyright (c) 2018-2026 by Robert Rothenberg.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
SEE ALSO
The file robots.toml included with this distribution contains links to documented rules.