1Mozilla::PublicSuffix(3U)ser Contributed Perl DocumentatiMoonzilla::PublicSuffix(3)
2
3
4

NAME

6       Mozilla::PublicSuffix - Get a domain name's public suffix via the
7       Mozilla Public Suffix List
8

SYNOPSIS

10           use feature qw(say);
11           use Mozilla::PublicSuffix qw(public_suffix);
12
13           say public_suffix('org');       # 'org'
14           say public_suffix('perl.org');  # 'org'
15           say public_suffix('perl.orc');  # undef
16           say public_suffix('ga.gov.au'); # 'gov.au'
17           say public_suffix('ga.goo.au'); # undef
18

DESCRIPTION

20       This module provides a single function that returns the public suffix
21       of a domain name by referencing a parsed copy of Mozilla's Public
22       Suffix List.  From the official website at <http://publicsuffix.org/>:
23
24           A "public suffix" is one under which Internet users can directly
25           register names.  Some examples of public suffixes are com, co.uk
26           and pvt.k12.wy.us. The Public Suffix List is a list of all known
27           public suffixes.
28
29       A copy of the official list is bundled with the distribution. As the
30       official list continues to be updated, the bundled copy will inevitably
31       fall out of date.  Aside from new releases always including the latest
32       version of the list, this distribution's installer provides the option
33       (defaults to "No") to check for a new version of the list and
34       download/use it if one is found.
35

FUNCTIONS

37       public_suffix($domain)
38           Exported on request. Simply returns the public suffix of the passed
39           domain name, or "undef" if either the domain name is not well-
40           formed or the public suffix is not found.
41

SEE ALSO

43       Domain::PublicSuffix
44           Similar to this module, with an object-oriented interface and
45           somewhat alternative interpretation of the rules Mozilla stipulates
46           for determining a public suffix.
47

AUTHOR

49       Richard Simo~es "<rsimoes AT cpan DOT org>"
50
52       Copyright X 2013 Richard Simo~es. This module is released under the
53       terms of the MIT License and may be modified and/or redistributed under
54       the same or any compatible license.
55
56
57
58perl v5.30.0                      2019-07-26          Mozilla::PublicSuffix(3)
Impressum