Subject: | Pod::Usage: override seq_i for italic text |
Hello,
[ Recently I posted this message to perl5-porters mailing list, but later
recognized that I should have used rt.cpan.org. ]
$ pod2usage --help |head -3
Usage:
pod2usage [-help] [-man] [-exit *exitval*] [-output *outfile*]
[-verbose *level*] [-pathlist *dirlist*] *file*
$
I find this *file* formatting for italic text very unusual for --help
output. I haven't seen any standard UNIX command with this formatting
convention for help output.
It looks even more unusual to me when B<--opt>=I<val> notation is used:
$ ./csv2tab --help |head -3
Usage:
csv2tab [-h|--help] [-n|--fields=*NF*] [-r|--relpace=*STR*] [*FILE*...]
$
The idea is that Pod::Text->seq_i method can be overriden in Pod::Usage:
--- Pod/Usage.pm- 2005-04-03 15:24:03 +0000
+++ Pod/Usage.pm 2005-08-13 11:52:47 +0000
@@ -562,6 +562,9 @@ sub select {
}
}
+# Override Pod::Text->seq_i to return just "arg", not "*arg*".
+sub seq_i { return $_[1] }
+
# This overrides the Pod::Text method to do something very akin to what
# Pod::Select did as well as the work done below by preprocess_paragraph.
# Note that the below is very, very specific to Pod::Text.
End of patch
Now it looks a lot better for me.
--
Alexey Tourbin
ALT Linux Team