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

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

Thread Previous | Thread Next
From:
Tels
Date:
December 13, 2000 09:17
Subject:
Re: =code language ... =back in POD
Message ID:
200012131717.MAA140234@www08.hway.net
-----BEGIN PGP SIGNED MESSAGE-----

Helo,

On 13-Dec-00 Nicholas Clark tried to scribble about:
> 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

Yes ;) But see bottom of mail!

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

[snip a lot]

I like =back, because we already have it. 

=edoc
=end
=plain

come to mind, but I think we dont need to repeat the HTML syntax desaster
and keep pod small and simple.

Anyway:
> 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.

I dunno how pod2text works internally, but I guess you can nest lists/over
etc indefinteley deep. So it probably uses some stack. 

When =code would be one of the things you can nest, it would work.
So the first gets ignored (as it was to be expected), and there is one
=back to much. Hopefully this does not imply large changed to the
pod-parser etc.

If =code is accepted, who would be the one to implement it? (Oups...)

Also, from perlpod:

> Here are some examples of how to use these:
>
>            =begin html
>
>            <br>Figure 1.<IMG SRC="figure1.png"><br>
>
>            =end html Here are some examples of how to use these:
>
>            =begin html
>
>            <br>Figure 1.<IMG SRC="figure1.png"><br>
>
>            =end html

=begin code perl

This is an example:

        $a = 4;

As is this:

        $b = 8;
=end

Would probably save some work! We only need all other pod formatters to
ignore the =begin code and =end. (Like they would need to ignore the =code
=back or not, f.i. syntax colouring of code etc).

Cheers,

Tels

Regards,

Tels

- --
 "Why do you go so slowly? Do you think this is some kind of game?"
 http://bloodgate.com/thief/     Thief - The Dark Project
 http://bloodgate.com/aifilter   Rewriting the HTML as we know it.
 http://freedomforlinks.de       Fight for your right to link. 
 PGP key available on http://bloodgate.com/tels.asc or via email.


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1

iQEVAwUBOjevzHcLPEOTuEwVAQHoygf+JYRVwJ0AmGXaSPgC/z5Pa/11pgWJ9fq8
nbYJRLXklzxHd1GX2CCtlKXt8UfF3ZxuG+qQl3G9T20ave1A+vA10cEfCDl7lxaE
NFUkIM8n3eEm1zg1RiTezH0uSWE98Hz7+rBPrAsaDXfhF+EZC0p8I47/TGDkCPtT
eDfMBmIpVaJVxHNK8++MOWKga24Epr6Kq6ZR/ZwunkVTBpPHs4HQXq/8evrizH72
0fWNKTpTwuzRHNqRaAaIcGzqwZNroXmUDBL8oNjRGFmWe9fryvp22c4IWCSD1VZu
ySSzlZC23B3vrLxdOVMc3ZAyYRiD73+hU2A7VGy9z5yPK1Wo1pykRQ==
=5u+R
-----END PGP SIGNATURE-----

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