Hi pod-people, it's been too quite on the mailing list lately so I though I'd come up with something to talk about.
I'm refactory my biggest perl app and one of it's module is for inline documentation a bit like perldoc. the module is in this distribution: http://khemir.net/files_for_download/PerlBuildSystem-bleed.tar.gz in PBS/Documentation.pm the module is just under 500 lines. It's not generic but I think there very little to change to achieve a generic module. Caching could also be implemented to speed up things, though I think it's fast enough. Here is a sample session: [EMAIL PROTECTED] perl_modules]$ pbs -d Searching and indexing pod sections. 100% [==========================================] Documentation command > h [pager] s[earch] section => search for a section. 'section_name' is a perl regex. i[ndex] [regex] => display an index of all the PBS help sections. 'regex' is a perl regex. o[utline] module => prints an outline of a module documentation. ex: 'o PBS::Build::Forked'. [pager] p[rint] module => prints a module pod. q[uit] => to quit. * optional 'pager' redirects output to the system pager. Documentation command > i 'Rules/C_depender.pm' A (much) more efficient update A really simple use A smoother bar update ... lots more Why should I use this module? Documentation command > o PBS o PBS 0: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Builders/Obigo.pm 1: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Builders/Objects.pm 2: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Configs/Compilers/gcc.pm 3: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Rules/C.pm 4: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Rules/C_DependAndBuild.pm 5: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Rules/C_depender.pm 6: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Rules/Compilers/cl.pm 7: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Rules/Compilers/gcc.pm 8: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Rules/Obigo.pm 9: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Rules/VisualStudioProject.pm 10: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Utils/VisualStudioProjectFile.pm 11: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Wizards/Plugin.pl 12: /usr/lib/perl5/site_perl/5.8.8/PBS/PBSLib/Wizards/StandardPbsfile.pl 13: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/CheckNodeName.pm 14: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/CreateDump.pm 15: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/CreateLog.pm 16: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/EvaluateShellCommand.pm 17: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/ExpandObjects.pm 18: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/FileWatchClient.pm 19: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/GraphGeneration.pm 20: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/PackageVisualisation.pm 21: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/PostPbs.pm 22: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/SimplifyRule.pm 23: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/TreeVisualisation.pm 24: /usr/lib/perl5/site_perl/5.8.8/PBS/Plugins/Visualisation.pm Documentation command > o PBS::PBS In '/usr/lib/perl5/site_perl/5.8.8/PBS/PBS.pm' SYNOPSIS DESCRIPTION EXPORT AUTHOR Documentation command > p PBS::PBS In file '/usr/lib/perl5/site_perl/5.8.8/PBS/PBS.pm': ==== SYNOPSIS ==== ... ==== AUTHOR ==== Khemir Nadim ibn Hamouda. [EMAIL PROTECTED] Documentation command > s breakpoints In file '/usr/lib/perl5/site_perl/5.8.8/PBS/Debug.pm': ==== BREAKPOINTs ==== AddBreakpoint ( 'hi' , DEPEND => 1 ... a bunch more lines = USE_DEBUGGER = ``USE_DEBUGGER'' if running under the perl debugger and ``USE_DEBUGGER'' is set, PBS will jump into the debugger after the breakpoint. Documentation command > q Is it worth making a generic self documentation module? What kind of commands would you like to see? Anything already available that does that? I'd be happy to get feed back before I rewrite this module (although I'd rather have someone else write it :) Help is also welcome. Cheers, Nadim.
