1 |
On Sat, 27 Nov 2004, Georgi Georgiev wrote: |
2 |
|
3 |
> maillog: 26/11/2004-10:17:34(+0000): Ciaran McCreesh types |
4 |
>> On Fri, 26 Nov 2004 11:25:10 +0900 Georgi Georgiev <chutz@×××.net> |
5 |
>> wrote: |
6 |
>>| I have nothing against in-line docs in general. I simply had trouble |
7 |
>>| imagining it in the bash case. |
8 |
>>| |
9 |
>>| What about using perldoc itself? Simply prepend every doc line with a |
10 |
>>| '#', then run |
11 |
>>| |
12 |
>>| awk '/^#/ { sub("#",""); print } |
13 |
>> |
14 |
>> In bash? How would that work? |
15 |
> |
16 |
> I imagined |
17 |
> |
18 |
> #=item blah blah |
19 |
> # more POD |
20 |
> # and more |
21 |
> # and more |
22 |
> #=cut |
23 |
|
24 |
Note that Pod::Parser has a method (preprocess_line) which one could |
25 |
utilize to do the strip without requiring an awk pre-processing step. |
26 |
|
27 |
That being said, as the pod reformatting packages are written as |
28 |
Pod::Parser subclasses, I'm not certain if it could be utilized |
29 |
gracefully without limiting the potential output formats. It may be |
30 |
possible to make a generic class which does the magic, and a magical |
31 |
subclass of that class which inherits from both it and a particular |
32 |
formatting subclass, such that preprocess_line comes from the generic |
33 |
class, and everything else comes from the formatting subclass. |
34 |
|
35 |
Ed |
36 |
|
37 |
-- |
38 |
gentoo-dev@g.o mailing list |