File Coverage

lib/Doxygen/Filter/Perl/POD.pm
Criterion Covered Total %
statement 15 29 51.7
branch n/a
condition n/a
subroutine 5 9 55.5
pod 4 4 100.0
total 24 42 57.1


line stmt bran cond sub pod time code
1             #** @file POD.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 88 2012-07-07 04:27:35Z jordan2175 $
22             #*
23             package Doxygen::Filter::Perl::POD;
24              
25 1     1   17 use 5.8.8;
  1         16  
  1         131  
26 1     1   4 use strict;
  1         2  
  1         38  
27 1     1   5 use warnings;
  1         1  
  1         51  
28 1     1   6 use parent qw(Pod::POM::View::HTML);
  1         8  
  1         6  
29 1     1   6884 use Log::Log4perl;
  1         2  
  1         8  
30              
31             our $VERSION = '1.70';
32             $VERSION = eval $VERSION;
33              
34              
35             sub view_pod
36             {
37 0     0 1   my ($self, $pod) = @_;
38 0           return $pod->content->present($self);
39             }
40              
41             sub view_head1
42             {
43 0     0 1   my ($self, $head1) = @_;
44 0           my $title = $head1->title->present($self);
45 0           my $name = $title;
46 0           $name =~ s/\s/_/g;
47 0           return "\n\@section $name $title\n" . $head1->content->present($self);
48             }
49              
50             sub view_head2
51             {
52 0     0 1   my ($self, $head2) = @_;
53 0           my $title = $head2->title->present($self);
54 0           my $name = $title;
55 0           $name =~ s/\s/_/g;
56 0           return "\n\@subsection $name $title\n" . $head2->content->present($self);
57             }
58              
59             sub view_seq_code
60             {
61 0     0 1   my ($self, $text) = @_;
62 0           return "\n\@code\n$text\n\@endcode\n";
63             }
64              
65              
66              
67              
68             =head1 NAME
69              
70             Doxygen::Filter::Perl::POD - A perl code pre-filter for Doxygen
71              
72             =head1 DESCRIPTION
73              
74             The Doxygen::Filter::Perl::POD is a helper module for use with Doxygen::Filter::Perl
75             and should not be called directly. This class actually overloads some of the methods
76             found in Pod::POM::View::HTML and converts their output to be in a Doxygen style that
77             Doxygen::Filter::Perl can use. The reason I went this route is Pod::POM appears to
78             be well established and pretty good at parsing POD. I thus did not want to reinvent
79             the wheel when it appears that this wheel works pretty well. Now this class should
80             probably find its way in to the Pod::POM::View tree at some point. But for now it
81             is here.
82              
83             =head1 AUTHOR
84              
85             Bret Jordan or
86              
87             =head1 LICENSE
88              
89             Doxygen::Filter::Perl::POD is dual licensed GPLv3 and Commerical. See the LICENSE
90             file for more details.
91              
92             =cut
93              
94             return 1;