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

Dear Monks, I'm just starting to use POD and have created a man page using pod2man which worked great. My problem is, the only time I can get a text tag to work (i.e., B<this is bold>) is if the tag comes immediately after a command, such as:

=head1 B<this> will work But this down I<here> won't work. =cut

Everything has worked as expected other than that so I suspect maybe that's the way it's supposed to work. . ? I've RTFM but nothings gives. Am I doing something wrong? Thanks! Andy

Replies are listed 'Best First'.
Re: No Grok POD Tag
by tadman (Prior) on Jul 03, 2001 at 16:15 UTC
    Your example works, but only if you put an extra line before "=cut". I put it into a file called test.pod:
    =head1 B<this> will work But this down I<here> won't work. =cut
    and did:      % perldoc ./test.pod Or:      % pod2html ./test.pod The output is approximately as follows:



    this will work

    But this down here won't work.

      I'm sorry, it looks like my example didn't cover the whole case. Here's some more sample:

      =head1 OPTIONS The following options are supported. Also note that some options are mutually exclusive (see B<SYNOPSIS>). =item I<-v> View only. This will create a view as defined in the configuration file for either I<development> or I<integration>. This option must include either the B<dev> or the B<int> argument. =item I<-s> Snapshot. Will create a snapshot view instead of a dynamic view. Note that the snapshot path must be defined in the configuration file. =item I<-e> Existing stream. Will create a dynamic view based on an existing stream. Note that the view should not exist already. The provided argument should be the I<name> of the stream - not the I<title> of the stream. =head1 EXAMPLES =item * joinproject -v dev configfilename.cfg =cut

      I tried putting in =cut statements (surrounded by empty lines) but that didn't work, either. I can't get anything other than the initial items to display with their appropriate tags.

      Thanks for your input - that did work for my example, unfortunately, I don't think I made my example comprehensive enough. Do you have any more ideas or do you see something I'm doing wrong in general (for example, should I be putting a =cut after every command block?)


      Andy

        Your problem is that you're indenting the text after your POD sections. (ie. =head1, =head2, =item, etc...) Indententation is like the POD equivalent of <PRE> tags in HTML.