Subject: | option »-w quotes:“”« throws exception »Invalid quote specification "“”"« |
To reproduce:
1. Install 3.24_01
2. cpanm --look Moose
3. perl -d:Confess=color `which perldoc` -o ansi -w loose:1 -w quotes:“” -w sentence:0 -w width:`tput cols` lib/Moose.pm
Devel::Confess is just used to get the stacktrace:
Error while formatting with Pod::Perldoc::ToANSI:
Invalid quote specification "“”" at …/Pod/Text.pm line 134.
Pod::Text::new("Pod::Text::Color", "loose", 1, "quotes", "\x{e2}\x{80}\x{9c}\x{e2}\x{80}\x{9d}", "sentence", 0, "width", 172, ...) called at …/Pod/Perldoc/ToANSI.pm line 41
Pod::Perldoc::ToANSI::parse_from_file(Pod::Perldoc::ToANSI=HASH(0x24023c0), "lib/Moose.pm", GLOB(0x2b16f10)) called at …/Pod/Perldoc.pm line 1496
eval {...} called at …/Pod/Perldoc.pm line 1496
Pod::Perldoc::render_findings(Pod::Perldoc=HASH(0x20badc8), ARRAY(0x243ebc8)) called at …/Pod/Perldoc.pm line 670
Pod::Perldoc::render_and_page(Pod::Perldoc=HASH(0x20badc8), ARRAY(0x243ebc8)) called at …/Pod/Perldoc.pm line 554
Pod::Perldoc::process(Pod::Perldoc=HASH(0x20badc8)) called at …/Pod/Perldoc.pm line 226
Pod::Perldoc::run("Pod::Perldoc") called at …/bin/perldoc line 9
at …/Pod/Perldoc.pm line 49.
Pod::Perldoc::warn(Pod::Perldoc=HASH(0x20badc8), "Error while formatting with Pod::Perldoc::ToANSI:\x{a} Invalid qu"...) called at …/Pod/Perldoc.pm line 1499
Pod::Perldoc::render_findings(Pod::Perldoc=HASH(0x20badc8), ARRAY(0x243ebc8)) called at …/Pod/Perldoc.pm line 670
Pod::Perldoc::render_and_page(Pod::Perldoc=HASH(0x20badc8), ARRAY(0x243ebc8)) called at …/Pod/Perldoc.pm line 554
Pod::Perldoc::process(Pod::Perldoc=HASH(0x20badc8)) called at …/Pod/Perldoc.pm line 226
Pod::Perldoc::run("Pod::Perldoc") called at …/bin/perldoc line 9
Got a 0-length file from lib/Moose.pm via Pod::Perldoc::ToANSI!?
So the problem is the lack of decoding of command-line parameters and the constructor gets 6 octets instead of 2 characters. Work-around until this bug is fixed:
perl -CA `which perldoc` …