Subject: | Fix for SYNOPSIS |
Contrary to what is written in the SYNOPSIS section of the POD, Encode::Punycode must be explicitely loaded.
Demo:
- this doesn't work:
$ perl -MEncode -E 'say encode(Punycode => "xx")'
Unknown encoding 'Punycode' at -e line 1.
- this works:
$ perl -MEncode -MEncode::Punycode -E 'say encode(Punycode => "xx")'
xx-
So a line "use Encode::Punycode;" must be added to the SYNOPSIS. See also the Test::Synopsis module that could be useful to check that the SYNOPSIS code works.
--
Olivier Mengué - http://perlresume.org/DOLMEN
Demo:
- this doesn't work:
$ perl -MEncode -E 'say encode(Punycode => "xx")'
Unknown encoding 'Punycode' at -e line 1.
- this works:
$ perl -MEncode -MEncode::Punycode -E 'say encode(Punycode => "xx")'
xx-
So a line "use Encode::Punycode;" must be added to the SYNOPSIS. See also the Test::Synopsis module that could be useful to check that the SYNOPSIS code works.
--
Olivier Mengué - http://perlresume.org/DOLMEN