--- cfg.pod 2004/11/20 17:09:35 1.3
+++ cfg.pod 2004/11/27 19:40:33 1.4
@@ -59,12 +59,63 @@
=item C<$txt = $cfg-E<gt>>B<format>C<();>
-=item C<$tree = $cfg-E<gt>>B<unpack>C<();>
+=item C<$tree = $cfg-E<gt>>B<unpack>C<(>[I<options]C<);>
=item C<undef $cfg;>
=back
+The B<unpack()> I<options> are:
+
+=over 4
+
+=item C<-merge =E<gt> >I<dir-regex>
+
+Merge all directives with a start token matching against I<dir-regex> by
+appending the argument tokens of second and following directives to the
+first directive. The resulting data structure is changed as following:
+
+ before: [['foo','foo1'],['bar'],['foo','foo2']]
+ after: [['foo','foo1','foo2'],['bar']]
+
+=item C<-index =E<gt> >I<dir-regex>
+
+Add all directives start tokens matching against I<dir-regex> to a
+pseudo-directive element pointing to the first occurrence of the
+directive.
+
+ before: [['foo','foo1'],['bar','bar1'],['quux','quux1']]
+ after: [{'foo'=>1,'bar'=>2,'quux'=>3},
+ ['foo','foo1'],['bar','bar1'],['quux','quux1']]
+
+This leverages perlref(1)'s "Pseudo-hashes: Using an array as a hash"
+approach to allow one to directly access directives by name. The
+following are then equivalent:
+
+ ...->{'bar'}
+ ...->[2]
+
+=item C<-strip =E<gt> >I<dir-regex>
+
+Strip start token of all directives where it matches the I<dir-regex>.
+This is useful in combination with B<-index> only.
+
+ before: [['foo','foo1'],['bar','bar1'],['quux','quux1']]
+ after: [['foo1'],['bar1'],['quux1']]
+
+=item C<-flatten =E<gt> >I<boolean-value>
+
+Flatten the tokens of all directives with a start token matching
+against I<dir-regex> by replacing empty arrays with I<boolean-value>,
+arrays containing a single token with just the token and leaving arrays
+containing more than one token as is. This is useful in combination with
+B<-index> and B<-strip>.
+
+ before: [['foo','foo1'],['bar'],['']]
+ after: [['foo','foo1'],'bar',1]
+
+=back
+
=head2 OO-STYLE API
The OO-style API is a wrapper around the C-style API and intended for
|