blib/lib/Pod/POM/Node/Content.pm

filter: Statementstmt 90.4% 19 / 21 Branchbran 50.0% 1 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 2 totaltotal 75.0% 27 / 36 CC 3 SCAR 6.5
CC
3
Cov
85%
present
3.1
new
2.0
BEGIN
1.0
CRAP 1.9
« blib/lib/Pod/POM/Node/Item.pm ↑ Summary blib/lib/Pod/POM/Node/Verbatim.pm »
1 #============================================================= -*-Perl-*-
2 #
3 # Pod::POM::Node::Content
4 #
5 # DESCRIPTION
6 # Module implementing specific nodes in a Pod::POM, subclassed from
7 # Pod::POM::Node.
8 #
9 # AUTHOR
10 # Andy Wardley <abw@kfs.org>
11 # Andrew Ford <a.ford@ford-mason.co.uk>
12 #
13 # COPYRIGHT
14 # Copyright (C) 2000, 2001 Andy Wardley. All Rights Reserved.
15 # Copyright (C) 2009 Andrew Ford. All Rights Reserved.
16 #
17 # This module is free software; you can redistribute it and/or
18 # modify it under the same terms as Perl itself.
19 #
20 # REVISION
21 # $Id: Content.pm 76 2009-08-20 20:41:33Z ford $
22 #
23 #========================================================================
24  
25 package Pod::POM::Node::Content;
26 18 $Pod::POM::Node::Content::VERSION = '2.01';
27 18 require 5.006;
28 18 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 18 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 18 ▶use Pod::POM::Constants qw( :all );
Subroutine BEGIN: called CC=1 SCAR=0.0
32 18 ▶use parent qw( Pod::POM::Node );
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
35 0 my $class = shift;
36 0 return bless [ @_ ], $class;
37 }
38  
39 298 ▶sub present {
Subroutine present: called CC=3 SCAR=11.3
Pod undocumented
40 298 my ($self, $view) = @_;
41 298 ▶ $view ||= $Pod::POM::DEFAULT_VIEW;
Condition66%2/3
$view ||= $Pod::POM::DEFAULT_VIEW
l!l&&r!l&&!r
29710
MC/DC0%0/2
$view ||= $Pod::POM::DEFAULT_VIEW
$view $Pod::POM::DEFAULT_VIEW
Truth table66%2/3
A ||= B
A= $viewB= $Pod::POM::DEFAULT_VIEW
ABresult
1X1
011
000
42 298 ▶ return join('', map { ref $_ ? $_->present($view) : $_ } @$self);
Branch: 1 branch
BranchTrueFalseTotal
ref $_ ? : 549 0 549
43 }
44  
45  
46 18 1;
47  
48  
49 =head1 NAME
50  
51 Pod::POM::Node::Content -
52  
53 =head1 SYNOPSIS
54  
55 use Pod::POM::Nodes;
56  
57 =head1 DESCRIPTION
58  
59 This module implements a specialization of the node class to represent
60  
61 =head1 AUTHOR
62  
63 Andrew Ford E<lt>a.ford@ford-mason.co.ukE<gt>
64  
65 Andy Wardley E<lt>abw@kfs.orgE<gt>
66  
67 =head1 COPYRIGHT
68  
69 Copyright (C) 2000, 2001 Andy Wardley. All Rights Reserved.
70  
71 Copyright (C) 2009 Andrew Ford. All Rights Reserved.
72  
73 This module is free software; you can redistribute it and/or
74 modify it under the same terms as Perl itself.
75  
76 =head1 SEE ALSO
77  
78 Consult L<Pod::POM::Node> for a discussion of nodes.
« blib/lib/Pod/POM/Node/Item.pm ↑ Summary blib/lib/Pod/POM/Node/Verbatim.pm »