table of contents
Zonemaster::Engine::Normalization(3pm) | User Contributed Perl Documentation | Zonemaster::Engine::Normalization(3pm) |
NAME¶
Zonemaster::Engine::Normalization - utility functions for names normalization
SYNOPSIS¶
use Zonemaster::Engine::Normalization; my ($errors, $final_domain) = normalize_name($domain);
EXPORTED FUNCTIONS¶
- normalize_label($label)
- Normalize a single label from a domain name.
If the label is ASCII only, it is down cased, else it is converted according to IDNA2008.
Downcasing of upper case non-ASCII characters, normalization to the Unicode NFC format and conversion from U-label to A-label is performed by libidn2 using "to_idn($name, ...)" in Zonemaster::LDNS.
Returns a tuple "($errors: ArrayRef[Zonemaster::Engine::Normalization::Error], $alabel: String)".
In case of errors, the returned label will be undefined. If the method succeeded an empty error array is returned.
- normalize_name($name)
- Normalize a domain name.
The normalization process is detailed in the normalization document <https://github.com/zonemaster/zonemaster/blob/master/docs/specifications/tests/RequirementsAndNormalizationOfDomainNames.md>.
Returns a tuple "($errors: ArrayRef[Zonemaster::Engine::Normalization::Error], $name: String)".
In case of errors, the returned name will be undefined. If the method succeeded an empty error array is returned.
2024-08-08 | perl v5.38.2 |