Net::I...meprep(3pm)
π NAME π
ok so Net::IDN::Nameprep β it's a Stringprep Profile for Internationalized Domain Names, and yes bestie that's RFC 3491 π¦
β¨ SYNOPSIS β¨
use Net::IDN::Nameprep;
$output = nameprep $input;
that's literally it. one import, one call, done. π
πΈ DESCRIPTION πΈ
okok so here's the vibe: this module implements the nameprep specification, which is all about how you prepare internationalized domain name (IDN) labels so that when people type a name in and when a system compares two names, it actually works out the way regular humans all over the world would expect it to. no cap.
nameprep is a profile of the stringprep protocol, and it's part of a whole suite of on-the-wire protocols for internationalizing the Domain Name System (DNS). it's giving infrastructure. it's giving backbone of the internet. π
π FUNCTIONS π
this module implements a single function, nameprep, and it gets exported by default. no hunting, no extra imports, she just shows up. π«Ά
nameprep( $input [, AllowUnassigned => 1 ] )
processes $input according to the nameprep specification and returns the result. main character behaviour, honestly.
β οΈ if$inputcontains characters that aren't allowed for nameprep, it throws an exception. so wrap it inevalif you need to, bestie. don't say I didn't warn you. π
this function takes the following optional parameter:
AllowUnassigned
(boolean) if you set this to a false value, then unassigned code points in $input are not allowed. bye. π
- False MUST be used for stored strings. like, mandatory. periodt.
- True MAY be used for queries.
- the default is true (for backwards compatibility).
π AUTHOR π
Claus Faerber <CFAERBER@cpan.org>
previous versions written by Tatsuhiko Miyagawa <miyagawa@bulknews.net>
shoutout to the OGs, we love a lineage. π
π LICENSE π
Copyright 2007-2015 Claus Faerber.
this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay. β¨
π¦ SEE ALSO π¦
Unicode::Stringprep- RFC 3491 (
<http://www.ietf.org/rfc/rfc3491.txt>)
and that's the whole thing, bestie π this page came from perl v5.36.0, dated 2022-11-19 β go forth and nameprep responsibly ππ
π¦ where this page comes from
- debian bookworm: libnet-idn-nameprep-perl 1.102+dfsg-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-idn-nameprep-perl 1.102+dfsg-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-idn-nameprep-perl 1.102+dfsg-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-idn-nameprep-perl 1.102+dfsg-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-idn-nameprep-perl 1.102+dfsg-3 Β· 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