in reply to Shell/perl Documentation

regarding http://bahut.alma.ch/2007_08_01_archive.html I have to admit that I didn't know ':' was a no-op in sh.

I testet it with bash and it seems to work, you didn't say if only bourne-shell dialects are effected, otherwise you should test. (this is a Perl forum after all)

Please note that practically the same trick also holds for Perl

print "hallo"; <<__DOC__; nothing happens here __DOC__ print " world!";

Since you are free to chose your end_of_doc marker (here __DOC__) you can choose any "documentation markup language". But this will somehow slow down the execution of your script...

If you better chose Doxygen or POD depends on what you want and if you have more Perl or sh scripts.

IIRC one difference is that Doxygen automatically parses function-headers and variables of modules and creates browsable hierarchies.

If you really need this you should search for doxygen bash solutions.

Otherwise you should be more precise about WHAT KIND of documentation you wanna create!

(Anyway you won't get much support for Doxygen here... :)

see also doxygen vs POD

Cheers Rolf

( addicted to the Perl Programming Language)

update

see also ...

doxygen for perl?

DoxygenFilter & DoxyFilt

Doxygen Perl Filter on Windows

perl plugin for doxygen

Documentation system

Strategies for maintenance of horrible code?

Creating not so plain documentation

Perl Documentation, again. :(

Need advise on documentation support tools in Perl

Replies are listed 'Best First'.
Re^2: Shell/perl Documentation
by Anonymous Monk on Jul 05, 2013 at 21:30 UTC
    I just have bash, ksh and perl scripts that I need to document. The documentation needs to be relatively simple explaining what the script does.

    As far as performance goes, would it be a good idea to keep the documentation separate? These are existing working scripts. Separating the documentation could be safer.

      You say "Separating the documentation could be safer". I've found that keeping the documentation in the same file as the code make it more likely that it will be updated when the code changes; you don't have to find the doc file. Personally, I'd say that it's safer to have up-to-date docs.