Mozilla::PublicSuffix(3pm) | User Contributed Perl Documentation | Mozilla::PublicSuffix(3pm) |
Mozilla::PublicSuffix - Get a domain name's public suffix via the Mozilla Public Suffix List
use feature qw(say); use Mozilla::PublicSuffix qw(public_suffix); say public_suffix('org'); # 'org' say public_suffix('perl.org'); # 'org' say public_suffix('perl.orc'); # undef say public_suffix('ga.gov.au'); # 'gov.au' say public_suffix('ga.goo.au'); # undef
This module provides a single function that returns the public suffix of a domain name by referencing a parsed copy of Mozilla's Public Suffix List. From the official website at <http://publicsuffix.org/>:
A copy of the official list is bundled with the distribution. As the official list continues to be updated, the bundled copy will inevitably fall out of date. Aside from new releases always including the latest version of the list, this distribution's installer provides the option (defaults to "No") to check for a new version of the list and download/use it if one is found.
Please submit bug reports to <https://rt.cpan.org/Public/Dist/Display.html?Name=Mozilla::PublicSuffix>.
If you would like to send patches, please send a git pull request to <mailto:bug-Mozilla::PublicSuffix@rt.cpan.org>.
Richard Simo~es "<rsimoes AT cpan DOT org>"
Tom Hukins
Copyright X 2013 Richard Simo~es. This module is released under the terms of the MIT License and may be modified and/or redistributed under the same or any compatible license.
2023-08-06 | perl v5.36.0 |