Skip to content

Commit 3812ecc

Browse files
committed
regen/HeaderParser: Clarify/correct pod
While using this module, I found various minor mistakes and unclear things in its documentation.
1 parent ee840d1 commit 3812ecc

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

regen/HeaderParser.pm

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,8 +1675,8 @@ rearrange its terms so that each line is not longer than this.
16751675
16761676
=item indent_define
16771677
1678-
Should #define clauses be indented when contained a clause expression that is
1679-
indented.
1678+
Should #define clauses be indented when contained in a clause expression that
1679+
is indented, default is yes: 1.
16801680
16811681
=item hug_define
16821682
@@ -1705,7 +1705,7 @@ based object which contains the following fields:
17051705
bless {
17061706
cond => [['defined(a)'],['defined(b)']],
17071707
type => "content",
1708-
sub_type => undef,
1708+
sub_type => "#undef",
17091709
raw => $raw_content_of_line,
17101710
line => $normalized_content_of_line,
17111711
level => $level,
@@ -1761,21 +1761,21 @@ it terminates.
17611761
17621762
=item type
17631763
1764-
This value indicates the type of the line. This may be one of the following:
1765-
'content', 'cond', 'define', 'include' and 'error'. Several of the types
1766-
have a sub_type.
1764+
This value indicates the type of the line. This may either 'content' or
1765+
'cond'. The sub_type gives finer detail.
17671766
17681767
=item sub_type
17691768
1770-
This value gives more detail on the type of the line where necessary.
1771-
Not all types have a subtype.
1769+
This value gives more detail on the type of the line.
17721770
17731771
Type | Sub Type
17741772
--------+----------
17751773
content | text
1776-
| include
1777-
| define
1778-
| error
1774+
| #include
1775+
| #define
1776+
| #error
1777+
| #pragma
1778+
| #undef
17791779
cond | #if
17801780
| #elif
17811781
| #else
@@ -1785,6 +1785,9 @@ Note that there are no '#ifdef' or '#elifndef' or similar expressions. All
17851785
expressions of that form are normalized into the '#if defined' form to
17861786
simplify processing.
17871787
1788+
For all sub_types except C<#endif>, the C<cond> array gives the conditions
1789+
after the line is executed.
1790+
17881791
=item raw
17891792
17901793
This was the raw original text before HeaderParser performed any modifications
@@ -1821,7 +1824,8 @@ or input it cannot handle.
18211824
18221825
=head2 lines_as_str
18231826
1824-
This function will return a string representation of the lines it is provided.
1827+
This function will return a string representation of the lines it is provided
1828+
via an array of HeaderLines objects produced by parse_fh() or by group_content()
18251829
18261830
=head2 group_content
18271831

0 commit comments

Comments
 (0)