| IDNA-Punycode documentation | view source | Contained in the IDNA-Punycode distribution. |
IDNA::Punycode - DEPRECATED module for IDNA and Punyode
This module is deprecated.
Please use Net::IDN::Encode to handle full domain names and Net::IDN::Punycode for raw Punycode encoding.
This module is provided for compatibility with earlier versions of
IDNA::Punycode.
The following functions are imported by default. If you also use Net::IDN::Punycode,
be sure to disable import from this module:
use IDNA::Punycode();
Sets $IDNA::Punycode::PREFIX to $prefix.
Do not use this function in larger applications or environments in which multiple application share global variables (such as mod_perl). Instead, set the variable locally:
local $IDNA::Punycode::PREFIX = 'yo--';
If $IDNA::Punycode::PREFIX is '', encodes $input with
Punycode.
If $IDNA::Punycode::PREFIX is not '', encodes $input with
Punycode and adds the prefix if $input does contain non-base
characters (i. e. characters above U+007F). If $input does
not contain any non-base characters, it is returned as-is.
This function does not do any string preparation as specified by nameprep or other stringprep profiles. Use Net::IDN::Encode if you just want to convert a domain name.
This function will croak on invalid input.
If $IDNA::Punycode::PREFIX is '', decodes $input with
Punycode.
If $IDNA::Punycode::PREFIX is not '', checks whether
$input starts with the prefix. If $input starts with the
prefix, the prefix is removed and the remainder is decoded with
Punycode. If $input does not start with the prefix, it is
returned as-is.
Of course, this function does not do any string preparation as specified by nameprep or other stringprep profiles (or some sort of de-preparation).
This function will croak on invalid input.
Claus Färber <CFAERBER@cpan.org>
Previous version written by Tatsuhiko Miyagawa <miyagawa@bulknews.net> and extended by Robert Urban <urban@UNIX-Beratung.de>.
Copyright 2007-2010 Claus Färber.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| IDNA-Punycode documentation | view source | Contained in the IDNA-Punycode distribution. |