Adding images to CPAN

Just as blog posts including images also documentation that includes images (even screenshots) is more plesant for the eye than just plain text. On both search.cpan.org, and Meta CPAN one can have images linked from the POD.

It would be awesome if more modules had a few images or screenshots included
and you can gain fame via the relevant Questhub Stencil.

11 Comments

Here's one example of a module that makes extensive use of HTML markup (and it's all dynamically generated at build time, too!) -- https://metacpan.org/module/Acme::CPANAuthors::Nonhuman

Interesting that nearly half (11/25) of the pictures are cats. What does that say about Perl programmers?

This gives a pretty good list of modules with embedded html in their pod:

http://grep.cpan.me/?q=%3Dbegin+html

What does that say about Perl programmers?

That they’re curmudgeonly, stubborn, independent yet highly social creatures?

It looks like there is no way to embed images so they are hosted at (meta)cpan, right? I would not recommend embedding links to external images in CPAN packages because they are not shipped as part of the distribution.

@jakob: I'm not sure... you might need to try it and see.. but I wouldn't be surprised if relative links got garbled in some way.

I don't see the harm in including image links that went to the outside, as long as they weren't critical to the documentation.

e.g. no harm will be done if the image link here is broken: https://metacpan.org/module/Dist::Zilla::App::Command::dumpphases

Interesting, I just noticed that my module isn't displaying images on search.cpan.org.... Gabor, did you discover what sco's requirements are for displaying images?

Why stop at images? How about adding presentation slides, screencasts, or video tutorials?

On the other hand, I'm wondering about security... There should be some kind of filtering for the HTML, even there isn't one already.

I'm now thinking about dummy CPAN modules that contain nothing but links to conference images/photos/videos (Acme::Media::Conference::YAPCNA2013), YouTube tutorials (Acme::Media::Tutorial::Dancer), etc. I'm pretty sure they are bad ideas, but perhaps someone has extra time on their hands? :)

@Steven: that sounds like an abuse of the CPAN to me. It is a repository of code, not all things related to Perl (IMHO).

Leave a comment

About Gabor Szabo

user-pic Perl author and trainer. Usually writing on other sites: Writing the Perl 5 Maven tutorial Perl 6 articles. Started a Perl IDE. Running the Weekly Perl newsletter. My personal blog.