How to add images to the documentation of Perl modules on CPAN
Having a lot of clear documentation for a CPAN module is awesome, but looking at a wall of text while reading it can be a bit boring.
First let's link to few examples:
Including images in MetaCPAN
Including images on search.cpan.org
So how can this be done?
Let's look at the source code of Char::Clicker.
It has the following section:
=begin HTML <p><img src="http://gphat.github.com/chart-clicker/static/images/examples/line.png" width="500" height="250" alt="Line Chart" /></p> =end HTML
That's all we need to include in the POD of the module.
The images are served from a Github page.
In the source code of SVG the example is slightly different:
=for HTML <p><img src="http://szabgab.com/img/SVG/circle.png" alt="SVG example circle" /></p>
Here the image is actually served from my own personal domain.