Using asterisk in pod item as text
Вопрос
I'm writing my perl documentation in POD format
my problem is, I want to have an item label simply called *
I tried =item *
, =item S<*>
, =item Z<>*
and =item E<42>
all approaches are interpreted as bullets, but I want the asterisk interpreted as normal text
any idea, how I can generally solve this problem without adding more text like =item "*"
?
I'm not sure, if this is helpful, but here is a small example (I abandoned the empty lines):
=pod
=head1 HEAD
=over 4
=item a
A
=item *
B
=item c
C
=back
=cut
I use podchecker to check my documents, before I use pod2text,pod2html,etc.
and it says =item type mismatch ('definition' vs. 'bullet')
I didn't said this in first place, because I thought every converter depends on the interpretation of the podchecker
Решение 2
okay the nicest solution I found so far is the use of =item S< >*
which produces the output
HEAD
a A
* B
c C
not exactly what I wanted (the * is a bit off) but anyway
Другие советы
It would help if you show the exact output you are looking for and the output you are getting.
I can get the asterisk to show up in the output of perldoc
as long as I make it the second =item
:
=head1 OPTIONS
=over 5
=item help
Help me!
=item *
Asterisk
=back
=cut
Here is the output I get from perldoc
:
OPTIONS
help Help me!
* Asterisk
Here is a pertinent quote from perlpod:
And perhaps most importantly, keep the items consistent: either use "=item *" for all of them, to produce bullets; or use "=item 1.", "=item 2.", etc., to produce numbered lists; or use "=item foo", "=item bar", etc.--namely, things that look nothing like bullets or numbers.
If you start with bullets or numbers, stick with them, as formatters use the first "=item" type to decide how to format the list.