Reputation: 141320
I was discussing here about setting no locales in Perl and was recommended to run this perldoc perllocale
in OSX Yosemite 10.10.3 but I get the error:
Error while formatting with Pod::Perldoc::ToMan:
at /System/Library/Perl/5.18/Pod/Perldoc.pm line 1346.
at /usr/bin/perldoc5.18 line 11.
Got a 0-length file from /System/Library/Perl/5.18/pods/perllocale.pod via Pod::Perldoc::ToMan!?
at /usr/bin/perldoc5.18 line 11.
which perldoc
gives /usr/bin/perldoc
so correct should be.
echo $PATH
gives
/usr/local/bin:/usr/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin:/Users/masi/.cabal/bin
where I notice to have some folders two times there but the possible overwriting should not be the cause of the problem.
My .bashrc
is empty but .profile
has just export LANG=en_US.UTF-8
.
What does this Perldoc error mean?
Upvotes: 1
Views: 134
Reputation: 11871
I got the exact same error on OSX Yosemite 10.10.3
bessarabov@bessarabov-osx:~$ perldoc perllocale
Error while formatting with Pod::Perldoc::ToMan:
at /System/Library/Perl/5.18/Pod/Perldoc.pm line 1346.
at /usr/bin/perldoc5.18 line 11.
Got a 0-length file from /System/Library/Perl/5.18/pods/perllocale.pod via Pod::Perldoc::ToMan!?
at /usr/bin/perldoc5.18 line 11.
bessarabov@bessarabov-osx:~$
The command perldoc -l perllocale
shows the path the the file:
bessarabov@bessarabov-osx:~$ perldoc -l perllocale
/System/Library/Perl/5.18/pods/perllocale.pod
bessarabov@bessarabov-osx:~$
The file is not empty and I've saved it to https://gist.github.com/bessarabov/20370992150a332dc0f0
OSX Yosemite 10.10.3 has perldoc version 3.19:
bessarabov@bessarabov-osx:~$ perl -MPod::Perldoc -E 'say $Pod::Perldoc::VERSION'
3.19
bessarabov@bessarabov-osx:~$
You can run PERLDOCDEBUG=5 perldoc perllocale
to see some debug info - here is the log https://gist.github.com/bessarabov/6e09b4e491d5a00c6304 but it is not very usefull.
I tried to find out why the perldoc fails. I don't have the exact answer, but the problem is with this part of code in the file /System/Library/Perl/5.18/Pod/Perldoc/ToMan.pm
:
while( $offset <= $length ) {
$self->debug( "Writing chunk $chunks\n" ); $chunks++;
syswrite $writer, ${ $self->{_text_ref} }, $chunk_size, $offset
or $self->die( $! );
$offset += $chunk_size;
...
}
Several interations of this loop works, but then syswrite
dies, and $!
has no information about the error.
I was able to read the documentation with other parser:
perldoc -MPod::Perldoc::ToText perllocale
The other way to solve this issue is to update to the latest version of Pod::Perldoc — perldoc 3.25 works fine with this file.
Upvotes: 3
Reputation: 98398
At a guess, I'd say the perllocale.pod file, which is supposed to have the perllocale documentation in pod format, is empty.
You can read the same documentation online at http://perldoc.perl.org/5.18.2/perllocale.html
Upvotes: 2