File Coverage

blib/lib/Stardoc/Convert.pm
Criterion Covered Total %
statement 14 14 100.0
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 19 21 90.4


line stmt bran cond sub pod time code
1             ##
2             # name: Stardoc::Convert
3             # abstract: Convert Stardoc Perl modules to pod
4             # author: Ingy döt Net
5             # copyright: 2011
6             # license: perl
7              
8             package Stardoc::Convert;
9 1     1   34156 use Mouse;
  1         48662  
  1         6  
10              
11 1     1   1071 use Stardoc::Module::Perl;
  1         4  
  1         46  
12 1     1   1134 use Stardoc::Document::Pod;
  1         3  
  1         143  
13              
14             sub perl_file_to_pod {
15 2     2 0 1586 my ($class, $file) = @_;
16 2         56 my $mod = Stardoc::Module::Perl->new(file => $file);
17 2 50       18 return unless $mod->has_doc;
18 2         38 my $doc = Stardoc::Document::Pod->new(module => $mod);
19 2         67 return $doc->format();
20             }
21              
22             1;