Net::I...meprep(3pm)

πŸ“¦
version 1.102 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 $input contains characters that aren't allowed for nameprep, it throws an exception. so wrap it in eval if 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 πŸ¦‹


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