home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / bin / checkpods.bat < prev    next >
Encoding:
DOS Batch File  |  1997-08-10  |  1.5 KB  |  49 lines

  1. @rem = '--*-Perl-*--
  2. @echo off
  3. perl -x -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  4. goto endofperl
  5. @rem ';
  6. #!perl
  7. #line 8
  8. #perl
  9.     eval 'exec c:\perl\bin\perl.exe -S $0 ${1+"$@"}'
  10.     if $running_under_some_shell;
  11. # From roderick@gate.netThu Sep  5 17:19:30 1996
  12. # Date: Thu, 05 Sep 1996 00:11:22 -0400
  13. # From: Roderick Schertler <roderick@gate.net>
  14. # To: perl5-porters@africa.nicoh.com
  15. # Subject: POD lines with only spaces
  16. # There are some places in the documentation where a POD directive is
  17. # ignored because the line before it contains whitespace (and so the
  18. # directive doesn't start a paragraph).  This patch adds a way to check
  19. # for these to the pod Makefile (though it isn't made part of the build
  20. # process, which would be a good idea), and fixes those places where the
  21. # problem currently exists.
  22. #
  23. #  Version 1.00  Original.
  24. #  Version 1.01  Andy Dougherty <doughera@lafcol.lafayette.edu>
  25. #    Trivial modifications to output format for easier auto-parsing
  26. #    Broke it out as a separate function to avoid nasty
  27. #    Make/Shell/Perl quoting problems, and also to make it easier
  28. #    to grow.  Someone will probably want to rewrite in terms of
  29. #    some sort of Pod::Checker module.  Or something.  Consider this
  30. #    a placeholder for the future.
  31. $exit = $last_blank = 0;
  32. while (<>) {
  33.     chop;
  34.     if (/^(=\S+)/ && $last_blank) {
  35.     printf "%s: line %5d, Non-empty line preceeding directive %s\n",
  36.         $ARGV, $., $1;
  37.     $exit = 1;
  38.     }
  39.     $last_blank = /^\s+$/;
  40.     if (eof) {
  41.     close(ARGV);
  42.     $last_blank = 0;
  43.     }
  44. }
  45. exit $exit
  46. __END__
  47. :endofperl
  48.