Extract the Synopsis of a Module

May 8th, 2011

Extract the Synopsis of a Module

When I begin to work with a module, most of the time what I do is to look at its pod, and copy the code in the synopsis that I’ll use as a a baseline.

Open pod, copy, paste. That’s a lot of exhauting work… While I’m pretty sure there’s already a better tool to do it somewhere in CPAN, here’s my little podsyn script that does all the hard work for me:


Its use on the command line is straigt-forward:

$ ./files/podsyn.pl Pod::XML

use Pod::XML;
my $parser = Pod::XML->new();

And crafting a vim command to do the same shouldn’t be too hard either (I’ll try to post one as soon as my vim-fu comes back to me).