문제

Maybe I'm not doing this right, but for a lot of POD link examples the code just doesn't work in pod2html.

For instance:

Owner: L<Eric Fossum|mailto:myemail@gmail.com>

Seems to work with C:\perldoc filename and C:\pod2text filename, but C:\pod2html --title=SomeText --outfile=filename.html filename outputs:

pod2html.bat: filename: cannot resolve L<Eric Fossum|mailto:myemail@gmail.com> in paragraph 6.

Do you guys think it's an issue with my install or my code? How do I fix it?

Update:

Here are my module versions:

Can't locate Pod.pm in @INC (@INC contains: ...) at (eval 1) line 2.
Pod::Html           : 1.09
Pod::Simple         : 3.14
Pod::Simple::XHTML  : 3.14
도움이 되었습니까?

해결책

It works fine for me with Perl v5.16.2. I'm using the following Pod:

=pod

Owner: L<Eric Fossum|mailto:myemail@gmail.com>

=cut

Inside the body of the HTML, it returns:

<p>Owner: <a href="mailto:myemail@gmail.com">Eric Fossum</a></p>

다른 팁

I had the same issue with a link such as Lhttp://svitsrv25.epfl.ch/R-doc/library/RColorBrewer/html/ColorBrewer.html> in perl 5.14.2. As oalders commented, pod2html uses the Pod::Html, which has been a core module since perl 5.4. Thus, I tested different versions of perl and found that the issue has been solved between perl 5.14.2 and perl 5.16.2.

So, the solution is to simply upgrade perl.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top