Unprocessed Links in Mobi Format #20

mgatto opened this Issue Jun 18, 2012 · 5 comments


None yet

2 participants

mgatto commented Jun 18, 2012

In the CHI Mobi ebook I got from perlybook, there are many strings which seem like they ought to be links but are probably still in pod format, as such (I'm no expert on POD):


This pattern occurs in many places.


Thanks for reporting.

An example found in the book:

Keys over this size will be digested|key_digester. The default is driver-specific; CHI::Driver::File|File, for example, defaults this to 240 due to file system limits. For most drivers there is no maximum.

I will have a look on that.


Does not appear in EPUB, so it is probably an issue of EBook::MOBI


Tanks @mgatto for telling us this issue.
EBook::MOBI did not handle "enhanced" use of the L<> tag in POD - so this was the cause.

I added some support for it in commit 6a776af1d1ac920f796ae9c44f1eec7a8471cfe0.
See borisdaeppen/EBook--MOBI@6a776af for details.

The testcases show how it behaves now:

$pod_input{inline_links} = <<'HEREDOC';
=head1 Inline Links

Link 1 L<Module>

Link 2 L<Module/Chapter>

Link 3 L<Name|Module>

Link 4 L<Name|Module/Chapter>

Link 5 L<Name|/Chapter>

Link 6 L</Chapter>

Link 7 L<http://perl.org>

Link 8 L<perl.org>

Link 9 L<Perl|http://perl.org>

Link 10 L<Perl|perl.org>


$html_out{inline_links} = <<'HEREDOC';
<h1>Inline Links</h1>
<p>Link 1 <a href='https://metacpan.org/module/Module'>Module</a></p>
<p>Link 2 <a href='https://metacpan.org/module/Module#Chapter'>Module/Chapter</a></p>
<p>Link 3 <a href='https://metacpan.org/module/Module'>Name</a></p>
<p>Link 4 <a href='https://metacpan.org/module/Module#Chapter'>Name</a></p>
<p>Link 5 Name (Chapter)</p>
<p>Link 6 "Chapter"</p>
<p>Link 7 <a href='http://perl.org'>http://perl.org</a></p>
<p>Link 8 <a href='perl.org'>perl.org</a></p>
<p>Link 9 <a href='http://perl.org'>Perl</a></p>
<p>Link 10 <a href='perl.org'>Perl</a></p>

I'm sure this is not yet perfect but it is much better as before...

As soon as EBook-MOBI-0.45 is spread on CPAN I'll install it on perlybook.org

mgatto commented Jun 25, 2012

That's great! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment