File Coverage

blib/lib/Perl6/Pod/Block/para.pm
Criterion Covered Total %
statement 18 53 33.9
branch 0 6 0.0
condition n/a
subroutine 6 9 66.6
pod 0 3 0.0
total 24 71 33.8


line stmt bran cond sub pod time code
1             package Perl6::Pod::Block::para;
2              
3             =pod
4              
5             =head1 NAME
6              
7             Perl6::Pod::Block::para - handle B<=para> -ordinary paragraph
8              
9             =head1 SYNOPSIS
10              
11             =begin para
12              
13             =begin para
14             This is an ordinary paragraph.
15             Its text will be squeezed and
16             short lines filled.
17              
18             This is I part of the same paragraph,
19             which continues until an...
20             =end para
21              
22              
23             =head1 DESCRIPTION
24              
25             B<=para> - Ordinary paragraph
26              
27             Ordinary paragraph blocks consist of text that is to be formatted into a document at the current level of nesting, with whitespace squeezed, lines filled, and any special inline mark-up applied.
28              
29             =cut
30              
31 3     3   15 use warnings;
  3         6  
  3         89  
32 3     3   16 use strict;
  3         6  
  3         68  
33 3     3   15 use Perl6::Pod::Block;
  3         6  
  3         71  
34 3     3   16 use base 'Perl6::Pod::Block';
  3         5  
  3         212  
35 3     3   14 use Perl6::Pod::Utl;
  3         4  
  3         59  
36 3     3   14 use Data::Dumper;
  3         6  
  3         1019  
37             our $VERSION = '0.01';
38              
39             sub to_xhtml {
40 0     0 0   my $self = shift;
41 0           my $to = shift;
42 0           my $w = $to->w;
43 0           foreach my $para (@{ $self->childs }) {
  0            
44 0 0         if(ref($para)) {
45 0           $to->visit($para);next;
  0            
46             }
47 0           $w->raw( '

');

48 0           my $fc = Perl6::Pod::Utl::parse_para($para);
49 0           $to->visit($fc);
50 0           $w->raw('

' );
51             }
52             }
53             sub to_docbook {
54 0     0 0   my $self = shift;
55 0           my $to = shift;
56 0           my $w = $to->w;
57 0           foreach my $para (@{ $self->childs }) {
  0            
58 0 0         if(ref($para)) {
59 0           $to->visit($para);next;
  0            
60             }
61 0           $w->raw( '');
62 0           my $fc = Perl6::Pod::Utl::parse_para($para);
63 0           $to->visit($fc);
64 0           $w->raw('' );
65             }
66             }
67              
68             sub to_latex {
69 0     0 0   my $self = shift;
70 0           my $to = shift;
71 0           my $w = $to->w;
72 0           foreach my $para (@{ $self->childs }) {
  0            
73 0 0         if(ref($para)) {
74 0           $to->visit(Perl6::Pod::Utl::parse_para($para) );next;
  0            
75             }
76 0           my $fc = Perl6::Pod::Utl::parse_para($para);
77 0           $to->visit($fc);
78 0           $w->say('');
79             }
80             }
81              
82             1;
83              
84             __END__