GET_ROOT_DOMAIN(1p)
π GET_ROOT_DOMAIN π
okay bestie, so this is get_root_domain β a lil Perl utility from the 1p manual section, and honestly? it's giving "small but mighty" β¨
πΈ NAME πΈ
get_root_domain β Retrieve suffix info from a domain using Domain::PublicSuffix
π¦ DESCRIPTION π¦
so the get_root_domain utility is out here using Domain::PublicSuffix to pull the root or suffix for a fully qualified domain name. you hand it an FQDN, and it hands you back three things, no gatekeeping:
- the "root domain" (the main character of the whole situation π)
- the suffix
- the TLD that was used to calculate that root domain
literally the whole point is figuring out which part of a domain is actually the root, and which part is just the suffix sitting on top of it. periodt. π
- Public Info Site:
β¨ SYNOPSIS β¨
get_root_domain <domainname>
π EXAMPLE USAGE π
watch her work, it's so satisfying fr fr:
$ get_root_domain www.google.com
Domain: www.google.com
Root Domain: google.com
Suffix: com
TLD: com
$ get_root_domain www.google.co.uk
Domain: www.google.co.uk
Root Domain: google.co.uk
Suffix: co.uk
TLD: uk
likeβ¦β¦ co.uk is a suffix and uk is the TLD and that's a whole different vibe from the .com example. iykyk π
π RETURN VALUES π
- Returns
0if a successful lookup is done. - non-zero otherwise. π (yeah. if it didn't work, you get a non-zero. that's the whole deal.)
π₯ SEE ALSO π₯
go read that one too, bestie, it's the brains behind the operation π§
π BUGS π
found a bug? got a feature request? please don't suffer in silence π
report it to bug-domain-publicsuffix at rt.cpan.org, or slide through the web interface at:
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Domain-PublicSuffix>
heads up: the author gets notified, and then you automatically get notified of progress on your bug as changes get made. so you're in the loop the whole time, no ghosting. π«Ά
β LICENSE β
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
and that's the tea, bestie π this was GET_ROOT_DOMAIN(1p) β perl v5.40.0, dated 2024-12-07 β stay iconic, go parse some domains, mwah πβ¨
π¦ where this page comes from
- debian trixie: libdomain-publicsuffix-perl 0.21-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdomain-publicsuffix-perl 0.21-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdomain-publicsuffix-perl 0.21-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms