Codex

IO::Socket::SSL::PublicSuffix

Section: User Contributed Perl Documentation (3pm)

Updated: 2015-06-20

Index?action=index Return to Main Contents


NAME

IO::Socket::SSL::PublicSuffix - provide access to Mozillas list of effective TLD names

SYNOPSIS

DESCRIPTION

This module uses the list of effective top level domain names from the mozilla project to determine the public top level domain for a given hostname.

Method

class->default(%args)
Returns object with builtin default. can be given in to specify the minimal suffix, default is 1.:
class->from_string(string,%args)
Returns object with configuration from string. See method for .:
class->from_file( file name| file handle, %args )
Returns object with configuration from file or file handle. See method for .:
$self->public_suffix( $host|\@host, [ $add ] )
In array context the function returns the non-tld part and the tld part of the given hostname, in scalar context only the tld part. It adds parts of the non-tld part to the tld, e.g. with it will return the root domain.

If there were no explicit matches against the public suffix configuration it will fall back to a suffix of length 1.

The function accepts a string or an array-ref (e.g. host split by ). In the first case it will return string(s), in the latter case array-ref(s).
International hostnames or labels can be in ASCII (IDNA form starting with ) or unicode. In the latter case an IDNA handling library like Net::IDN:::Encode, Net::LibIDN or recent versions of URI need to be installed.

:

($self|class)->can_idn
Returns true if IDN support is available.:

FILES

http://publicsuffix.org/list/effective_tld_names.dat

SEE ALSO

Domain::PublicSuffix, Mozilla::PublicSuffix

BUGS

AUTHOR

Steffen Ullrich


Index

NAME

SYNOPSIS

DESCRIPTION

Method

FILES

SEE ALSO

BUGS

AUTHOR