develooper Front page | perl.perl5.porters | Postings from December 2000

Re: =code language ... =back in POD

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
December 13, 2000 03:10
Subject:
Re: =code language ... =back in POD
Message ID:
20001213111026.D44203@plum.flirble.org
On Tue, Dec 12, 2000 at 07:24:17PM +0100, Tels wrote:
> =language Perl
> =back
> 
> but =code is shorter, so I prefer it.

I think =code is good to start it. (better than some complex
=for codechecker perl
=for codechecker text

But I don't think it's safe to use =back as the end:

=head1 This is a test

Here is a list

=over

=item Outer list

=over

=item This is the first inner item

We have some code

=code perl

    print "You have perl $]\n"

=back

=item This is the second inner item

No code here

=back

=item Outer list again

Some text

=back

The end

=cut

run through pod2text looks like this:

This is a test
    Here is a list

    Outer list
        This is the first inner item
            We have some code

                print "You have perl $]\n"

    This is the second inner item
        No code here

    Outer list again
    Some text

    The end


when it should look like it always used to:

This is a test
    Here is a list

    Outer list
        This is the first inner item
            We have some code

                print "You have perl $]\n"

        This is the second inner item
            No code here

    Outer list again
        Some text

    The end


The two errors I get with =code =back are

/home/nick/test/foo.pod:15: Unknown command paragraph "=code perl"
Unmatched =back at /usr/local/bin/pod2text line 7

[hmm. Should that error give the line in the pod of the =back ?]

The first is to be expected, but the closing =back is taken as part of the
list, so the formatting gets messed up.

I can't think of a good new word to use instead of =back
Unambiguous 4 letter words seem to be favoured, and none spring to mind.

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About