One common criticism about AnnoCPAN is that people will never see the annotations when using perldoc on their machine. I decided to address that by writing a version of perldoc that shows the annotations locally (I called it annopod to avoid name clashes, but you can rename it or alias it to perldoc if you want).

It is a subclass of Pod::Perldoc, and it works by using a local SQLite database (that you can download from annocpan.org) and filtering the POD to insert the notes before rendering it. It was actually very easy to write, thanks to the modular design of Pod::Perldoc, which is behind the implementation of perldoc that comes with perl-5.8.1 and later. If I had used the older perldoc, it would have been really painful. Thanks, Sean, for Pod::Perldoc!

Of course, this still doesn't fix the original complaint completely, except for those users that decide to install and use annopod...

Replies are listed 'Best First'.
Re: A perldoc with annotations
by simonm (Vicar) on Jul 23, 2005 at 16:41 UTC
    Very nice. This might also represent an easy way for other Perl documentation sites like search.cpan.org and perldoc.com to mirror the annotations -- rather than having to build a live annotation viewer, they can just produce HTML pages with the annotations.