Icon for Dimension.orgIcon for TalentIcon for ToolsIcon for Doorways.org
Icon for ToolsIcon for Perl Tools

DoxyFilt: DoxyLine.pl Source File

  • Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List

DoxyLine.pl

Go to the documentation of this file.
00001 #/usr/bin/perl
00002 
00003 =head1 NAME
00004 
00005 C<DoxyLine.pl> -
00006 Accumulate line counts from DoxyFilt STDERR logging.
00007 
00008 =head1 SYNOPSIS
00009 
00010 On Mandrake Linux with bash:
00011 
00012 The commands:
00013     doxygen 2> Doxygen.log
00014     perl DoxyLine.pl --path=Doxygen.log \
00015                      Perl/code Perl/comment Perl/blank POD/POD
00016     
00017 might generate:
00018 
00019     --------------------------------------------------------------
00020           Perl / code               1516
00021                / comment             311
00022                / blank               768
00023            POD / POD                1632
00024     --------------------------------------------------------------
00025            Sub / Total              4227
00026          Grand / Total              4243
00027     --------------------------------------------------------------
00028                / (uncounted           16)
00029 
00030 =cut
00031 
00032 #=| \ingroup    scripts
00033 
00034 use     strict;
00035 use     warnings;
00036 
00037 use     Getopt::Long;
00038 
00039 use     constant    LINE_LENGTH =>  62;
00040 use     constant    SEPARATOR   =>  '-' x LINE_LENGTH . "\n";
00041 
00042 ###########################################################################
00043 # Command-line arguments:
00044 
00045 my  %flags = ( );
00046 my  $opts = GetOptions('doxygen'    => \$flags{doxy},
00047                        'help'       => \$flags{help},
00048                        'path=s'     => \$flags{path});
00049 
00050 $flags{path} = shift
00051     unless $flags{path}
00052         || ! @ARGV;
00053 
00054 die <<USAGE if $flags{help} || ! $flags{path};
00055 usage:  $0 <flag>* [ <path> ]
00056         Process file specified by <path> (or via --path flag),
00057         generating faux C++ and Doxygen comments to standard output
00058     --doxygen       wrap data in Doxygen page
00059     --help          show this usage description
00060     --path=<path>   specify file path (or use positional argument)
00061 USAGE
00062 
00063 ###########################################################################
00064 ###########################################################################
00065 #
00066 # Main Program:
00067 #
00068 
00069 die "Path is non-existent:\n    ", $flags{path}, "\n"
00070     unless -f $flags{path};
00071 
00072 die "Unable to open file for reading:\n    ", $flags{path}, "\n  ", $!, "\n"
00073     unless open SOURCE, '<', $flags{path};
00074 
00075 print <<FILE_HEADER if $flags{doxy};
00162 FILE_FOOTER
00163     
00164 ###########################################################################
00165 ###########################################################################
00166 
00167 __END__
00168 
00169 =head1 SEE ALSO
00170 
00171 Doxygen::Filter, http://www.doxygen.org
00172 
00173 =head1 COPYRIGHT
00174 
00175 Copyright (C) 2004-2010  Marc M. Adkins
00176 
00177 This library is free software; you can redistribute it and/or
00178 modify it under the same terms as Perl itself.
00179 
00180 This program is distributed in the hope that it will be useful, but
00181 without any warranty; without even the implied warranty of
00182 merchantability or fitness for a particular purpose.
00183 
00184 =head1 AUTHOR
00185 
00186 Marc M. Adkins  L<mailto:Perl@Doorways.org>
00187 
00188 =cut

Generated on Mon Dec 27 2010 15:15:39 for DoxyFilt by  doxygen 1.7.1

www.dimension.org logo

(C)opyright 1998 - 2012 Dimension.org

WebMaster