File Coverage

blib/lib/Pod/POM/Node/Item.pm
Criterion Covered Total %
statement 12 12 100.0
branch 2 2 100.0
condition 1 2 50.0
subroutine 4 4 100.0
pod 0 1 0.0
total 19 21 90.4


line stmt bran cond sub pod time code
1             #============================================================= -*-Perl-*-
2             #
3             # Pod::POM::Nodes
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: Item.pm 89 2013-05-30 07:41:52Z ford $
22             #
23             #========================================================================
24              
25             package Pod::POM::Node::Item;
26             $Pod::POM::Node::Item::VERSION = '0.30';
27             require 5.006;
28 18     18   78 use strict;
  18         24  
  18         394  
29 18     18   74 use warnings;
  18         35  
  18         518  
30              
31 18     18   78 use parent qw( Pod::POM::Node );
  18         25  
  18         79  
32              
33             our @ATTRIBS = ( title => '*' );
34             our @ACCEPT = qw( over begin for text verbatim code );
35              
36             sub new {
37 67     67 0 122 my ($class, $pom, $title) = @_;
38 67 100 50     244 $title = $pom->parse_sequence($title)
39             || return $class->error($pom->error())
40             if length $title;
41 67         221 return $class->SUPER::new($pom, $title);
42             }
43              
44             1;
45              
46             =head1 NAME
47              
48             Pod::POM::Node::Item -
49              
50             =head1 SYNOPSIS
51              
52             use Pod::POM::Nodes;
53              
54             =head1 DESCRIPTION
55              
56             This module implements a specialization of the node class to represent C<=item> elements.
57              
58             =head1 AUTHOR
59              
60             Andrew Ford Ea.ford@ford-mason.co.ukE
61              
62             Andy Wardley Eabw@kfs.orgE
63              
64             =head1 COPYRIGHT
65              
66             Copyright (C) 2000, 2001 Andy Wardley. All Rights Reserved.
67              
68             Copyright (C) 2009 Andrew Ford. All Rights Reserved.
69              
70             This module is free software; you can redistribute it and/or
71             modify it under the same terms as Perl itself.
72              
73             =head1 SEE ALSO
74              
75             Consult L for a discussion of nodes.