Doxygen.pm
Go to the documentation of this file.
1 #** @file Doxygen.pm
2 # @verbatim
3 #####################################################################
4 # This program is not guaranteed to work at all, and by using this #
5 # program you release the author of any and all liability. #
6 # #
7 # You may use this code as long as you are in compliance with the #
8 # license (see the LICENSE file) and this notice, disclaimer and #
9 # comment box remain intact and unchanged. #
10 # #
11 # Package: Doxygen::Filter::Perl #
12 # Class: POD #
13 # Description: Methods for prefiltering Perl code for Doxygen #
14 # #
15 # Written by: Bret Jordan (jordan at open1x littledot org) #
16 # Created: 2011-10-13 #
17 #####################################################################
18 # @endverbatim
19 #
20 # @copy 2011, Bret Jordan (jordan2175@gmail.com, jordan@open1x.org)
21 # $Id: POD.pm 73 2011-12-22 23:07:14Z jordan2175 $
22 #
23 # @note Modified on 6/15/2012 by Andreas Schuh to remove dependency
24 # on Log::Log4perl module.
25 #
26 # @note Modified on 6/20/2012 by Andreas Schuh to make it part of
27 # Pod::POM::View package, which in turn has been included
28 # as part of BASIS. The original Perl module was
29 # Doxygen::Filter::Perl::POD which is part of the
30 # Doxygen::Filter::Perl package.
31 #*
32 package BASIS::Pod::POM::View::Doxygen;
33 
34 use 5.8.8;
35 use strict;
36 use warnings;
37 use parent qw(BASIS::Pod::POM::View::HTML);
38 
39 our $VERSION = '1.00';
40 $VERSION = eval $VERSION;
41 
42 
43 sub view_pod
44 {
45  my ($self, $pod) = @_;
46  return $pod->content->present($self);
47 }
48 
49 sub view_head1
50 {
51  my ($self, $head1) = @_;
52  my $title = $head1->title->present($self);
53  my $name = $title;
54  $name =~ s/\s/_/g;
55  return "\n\@section $name $title\n" . $head1->content->present($self);
56 }
57 
58 sub view_head2
59 {
60  my ($self, $head2) = @_;
61  my $title = $head2->title->present($self);
62  my $name = $title;
63  $name =~ s/\s/_/g;
64  return "\n\@subsection $name $title\n" . $head2->content->present($self);
65 }
66 
67 sub view_seq_code
68 {
69  my ($self, $text) = @_;
70  return "\n\@code\n$text\n\@endcode\n";
71 }
72 
73 
74 
75 
76 =head1 NAME
77 
78 Pod::POM::View::Doxygen - A perl code pre-filter for Doxygen
79 
80 =head1 DESCRIPTION
81 
82 The Pod::POM::View::Doxygen is a helper module for use with Doxygen filter
83 implementations which process Perl source files in order to generate C-like
84 output which is understood by Doxygen. This class inherits from Pod::POM::View::HTML
85 and overloads some of its methods and converts their output to be in a Doxygen
86 style that Doxygen::Filter::Perl and other filter implementations can use.
87 
88 =head1 AUTHOR
89 
90 Bret Jordan <jordan at open1x littledot org> or <jordan2175 at gmail littledot com>
91 
92 =head1 LICENSE
93 
94 Pod::POM::View::Doxygen (originally Doxygen::Filter::Perl::POD) is dual licensed
95 GPLv3 and Commerical. See the LICENSE file for more details.
96 
97 =cut
98 
99 return 1;