4 use Debian::Debhelper::Dh_Lib;
12 open(FILE, "<$f") || die("opening $f: $!\n");
15 /^\d+\.\s/ && push(@toc, $_);
17 close(FILE) || die("closing $f: $!\n");
21 my @entoc = gettoc("developers-reference.txt");
24 if ( $#entoc == -1 ) {
25 error("found no entries in the TOC, aborting");
26 } elsif ( $#entoc < 4 ) {
27 error("only found " . $#entoc . " entries in the TOC, aborting");
29 verbose_print("found " . $#entoc . " entries in TOC");
31 my $entoc = " " . join('${Newline} ', @entoc);
33 foreach my $package (@{$dh{DOPACKAGES}}) {
34 addsubstvar($package, "TOC:en", $entoc);