GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mozilla::PublicSuffix(3) User Contributed Perl Documentation Mozilla::PublicSuffix(3)
 

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 "public suffix" is one under which Internet users can directly register names. Some examples of public suffixes are com, co.uk and pvt.k12.wy.us. The Public Suffix List is a list of all known public suffixes.
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.

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

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

Richard Simo~es "<rsimoes AT cpan DOT org>"

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.
2019-01-01 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.