]> git.imager.perl.org - imager.git/blobdiff - apidocs.perl
link zlib in using the default installed library name on Win32 instead of as libz.
[imager.git] / apidocs.perl
index 366c425a23b1aba6fcd8a51b587cb0e307bdff46..3559870d794c62b2ff7ed4154d0d66ad4fad29e5 100644 (file)
@@ -1,5 +1,6 @@
 #!perl -w
 use strict;
+use ExtUtils::Manifest 'maniread';
 
 my $outname = shift || '-';
 
@@ -9,7 +10,8 @@ my %funcs = map { $_ => 1 } @funcs;
 
 # look for files to parse
 
-my @files = grep $_ ne 'Imager.xs', glob '*.c';
+my $mani = maniread;
+my @files = grep /\.(c|im)$/, keys %$mani;
 
 # scan each file for =item <func>\b
 my $func;
@@ -34,7 +36,7 @@ for my $file (@files) {
     elsif ($func && /^=(cut|head)/) {
       if ($funcs{$func}) { # only save the API functions
         $alldocs{$func} = [ @funcdocs ];
-        $from{$func} = "Line $start in $file";
+        $from{$func} = "File $file";
         if ($category) {
           $funccats{$func} = $category;
           push @{$cats{$category}}, $func;
@@ -72,8 +74,8 @@ print OUT <<'EOS';
 Do not edit this file, it is generated automatically by apidocs.perl
 from Imager's source files.
 
-Each function description has a comment listing the source file and
-line number where you can find the documentation.
+Each function description has a comment listing the source file where
+you can find the documentation.
 
 =head1 NAME