BASIS  r3148
Doxygen.pm
Go to the documentation of this file.
00001 #** @file Doxygen.pm
00002 # @verbatim
00003 #####################################################################
00004 # This program is not guaranteed to work at all, and by using this  #
00005 # program you release the author of any and all liability.          #
00006 #                                                                   #
00007 # You may use this code as long as you are in compliance with the   #
00008 # license (see the LICENSE file) and this notice, disclaimer and    #
00009 # comment box remain intact and unchanged.                          #
00010 #                                                                   #
00011 # Package:     Doxygen::Filter::Perl                                #
00012 # Class:       POD                                                  #
00013 # Description: Methods for prefiltering Perl code for Doxygen       #
00014 #                                                                   #
00015 # Written by:  Bret Jordan (jordan at open1x littledot org)         #
00016 # Created:     2011-10-13                                           #
00017 ##################################################################### 
00018 # @endverbatim
00019 #
00020 # @copy 2011, Bret Jordan (jordan2175@gmail.com, jordan@open1x.org)
00021 # $Id: POD.pm 73 2011-12-22 23:07:14Z jordan2175 $
00022 #
00023 # @note Modified on 6/15/2012 by Andreas Schuh to remove dependency
00024 #       on Log::Log4perl module.
00025 #
00026 # @note Modified on 6/20/2012 by Andreas Schuh to make it part of
00027 #       Pod::POM::View package, which in turn has been included
00028 #       as part of BASIS. The original Perl module was
00029 #       Doxygen::Filter::Perl::POD which is part of the
00030 #       Doxygen::Filter::Perl package.
00031 #*
00032 package BASIS::Pod::POM::View::Doxygen;
00033 
00034 use 5.8.8;
00035 use strict;
00036 use warnings;
00037 use parent qw(BASIS::Pod::POM::View::HTML);
00038 
00039 our $VERSION = '1.00';
00040 $VERSION = eval $VERSION;
00041 
00042 
00043 sub view_pod 
00044 {
00045     my ($self, $pod) = @_;
00046     return $pod->content->present($self);
00047 }
00048 
00049 sub view_head1 
00050 {
00051     my ($self, $head1) = @_;
00052     my $title = $head1->title->present($self);
00053     my $name = $title;
00054     $name =~ s/\s/_/g;
00055     return "\n\@section $name $title\n" . $head1->content->present($self);
00056 }
00057 
00058 sub view_head2 
00059 {
00060     my ($self, $head2) = @_;
00061     my $title = $head2->title->present($self);
00062     my $name = $title;
00063     $name =~ s/\s/_/g;    
00064     return "\n\@subsection $name $title\n" . $head2->content->present($self);
00065 }
00066 
00067 sub view_seq_code 
00068 {
00069     my ($self, $text) = @_;
00070     return "\n\@code\n$text\n\@endcode\n";
00071 }
00072 
00073 
00074 
00075 
00076 =head1 NAME
00077 
00078 Pod::POM::View::Doxygen - A perl code pre-filter for Doxygen
00079 
00080 =head1 DESCRIPTION
00081 
00082 The Pod::POM::View::Doxygen is a helper module for use with Doxygen filter
00083 implementations which process Perl source files in order to generate C-like
00084 output which is understood by Doxygen. This class inherits from Pod::POM::View::HTML
00085 and overloads some of its methods and converts their output to be in a Doxygen
00086 style that Doxygen::Filter::Perl and other filter implementations can use.
00087 
00088 =head1 AUTHOR
00089 
00090 Bret Jordan <jordan at open1x littledot org> or <jordan2175 at gmail littledot com>
00091 
00092 =head1 LICENSE
00093 
00094 Pod::POM::View::Doxygen (originally Doxygen::Filter::Perl::POD) is dual licensed
00095 GPLv3 and Commerical. See the LICENSE file for more details.
00096 
00097 =cut
00098 
00099 return 1;