File Coverage

blib/lib/Pod/POM/Node/Code.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition 2 3 66.6
subroutine 4 4 100.0
pod 0 1 0.0
total 18 20 90.0


line stmt bran cond sub pod time code
1             #============================================================= -*-Perl-*-
2             #
3             # Pod::POM::Node::Code
4             #
5             # DESCRIPTION
6             # Module implementing specific nodes in a Pod::POM, subclassed from
7             # Pod::POM::Node.
8             #
9             # AUTHOR
10             # Andy Wardley
11             # Andrew Ford
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: Code.pm 89 2013-05-30 07:41:52Z ford $
22             #
23             #========================================================================
24              
25             package Pod::POM::Node::Code;
26             $Pod::POM::Node::Code::VERSION = '0.30';
27             require 5.006;
28 18     18   76 use strict;
  18         23  
  18         387  
29 18     18   78 use warnings;
  18         23  
  18         447  
30              
31 18     18   70 use parent qw( Pod::POM::Node );
  18         28  
  18         79  
32              
33             our @ATTRIBS = ( text => '' );
34              
35             sub present {
36 3     3 0 5 my ($self, $view) = @_;
37 3   66     13 $view ||= $Pod::POM::DEFAULT_VIEW;
38 3         31 return $view->view_code($self->{ text });
39             }
40              
41             1;
42              
43             =head1 NAME
44              
45             Pod::POM::Node::Code -
46              
47             =head1 SYNOPSIS
48              
49             =head1 DESCRIPTION
50              
51             This module implements a specialization of the node class to represent code elements.
52              
53             =head1 AUTHOR
54              
55             Andrew Ford Ea.ford@ford-mason.co.ukE
56              
57             Andy Wardley Eabw@kfs.orgE
58              
59             =head1 COPYRIGHT
60              
61             Copyright (C) 2000, 2001 Andy Wardley. All Rights Reserved.
62              
63             Copyright (C) 2009 Andrew Ford. All Rights Reserved.
64              
65             This module is free software; you can redistribute it and/or
66             modify it under the same terms as Perl itself.
67              
68             =head1 SEE ALSO
69              
70             Consult L for a discussion of nodes.