This is foo =========== Should be titled foo This is bar ----------- Should be titled bar

this is baz

Should be titled baz

ignore this baz title

=head1 NAME This is blag =head1 TEXT Should be titled blag.
This is gab =========== Should be titled gab This is not gab =============== That heading should be ignored

This is boo Should be titled boo This should not appear ----------- Should be titled floo The winners are: - $[foo.title] - $[bar.title] - $[baz.title] - $[blag.title] - $[gab.title] - $[boo.title] - $[floo.title] Title: $[this.title] // ${foo} Title: $[this.title] // ${bar} Title: $[this.title] // ${baz} Title: $[this.title] // ${blag} Title: $[this.title] // ${gab} Title: $[this.title] // ${boo} Title: $[this.title] // ${floo}