1 my @templates = <../templates/factory/*>;
5 for my $template (@templates) {
6 open TEMP, $template or die $!;
7 $template =~ s/.*factory\///g;
9 next unless /^#?=for doc/... /^#?=cut/
10 and not /(%#?\]|\[%#?)$/
11 and not /=cut|=for doc/; # Much magic.
13 $doc{$template} .= $_;
18 if (!/^=template (\w+)/) { print; next; }
19 die "Can't find doc for template $1" unless $doc{$1};