s_gaurav1091 has asked for the wisdom of the Perl Monks concerning the following question:

hi monks,

I am tryng to create a man page for some commands.I am creating a direcory by the name of cat.1 in /usr/man and in that direcory i am storing a file cmsd.1 which consist of some details about this command cmsd. Now when i am typing man cmsd ,its not working instead its giving errors like this

man[6]: .B: not found. man[7]: .SH: not found. man[2]: .TH: not found. man[3]: .SH: not found. man[4]: sample: not found. man[5]: .SH: not found. man[6]: .B: not found. man[7]: .SH: not found.
and so on in the same fashion ,I am not able to find out what the problem is it will be of great help if someone can guide me into creating man pages

CODE tags added by Arunbear

Replies are listed 'Best First'.
Re: trying to create a man page
by Zaxo (Archbishop) on Aug 03, 2005 at 08:30 UTC

    The perly way is to write your man page as pod and run pod2man on it to get troff formatting. Your errors look as if you wrote the man page as plain text.

    After Compline,
    Zaxo

      ... and once your scripts, configuration files, etc. are documented in pod, pack everything as a perl module for easy distribution and installation, i.e.:
      # create a new module skeleton: $ h2xs -AXn My::App ... $ cd My-App # remove unused lib directory and the module skeleton inside $ rm -Rf lib # create dirs for binaries and documentation $ mkdir bin $ mkdir pod # and move your files there $ mv .../my-scripts.pl bin $ mv .../my-docs.pod pod # recreate the MANIFEST $ rm MANIFEST $ perl Makefile.PL $ make manifest # and update the Makefile.PL to install the scripts # and manual pages automatically: $ vi Makefile.PL
      (read the documentation for EXE_FILES, MAN1POD and MAN3POD inside ExtUtils::MakeMaker).
      # test that everything works $ perl Makefile.PL && make $ su root$ make install $ man my-script # and pack it $ make dist
Re: trying to create a man page
by jeteve (Pilgrim) on Aug 03, 2005 at 08:33 UTC
    Hi. When you create perl modules with the CPAN way, man pages are automatically extracted from the pod documentation of your perl code and then installed on the system when you make install. You also can use pod2man to produce manual pages from files that contains perl pod. Hope it helps !
    Nice photos of naked perl sources here !
Re: trying to create a man page
by anonymized user 468275 (Curate) on Aug 03, 2005 at 08:31 UTC
    Given the non-perl nature of the OP, here is one of the many articles on how to create a man page that can be found using Google or some other crawler: http://anaturb.net/create_man_p.htm

    One world, one people