| 1 | #============================================================= -*-Perl-*- | ||||||||||||||||||||
| 2 | # | ||||||||||||||||||||
| 3 | # Pod::POM::Node::Head1 | ||||||||||||||||||||
| 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: Head1.pm 89 2013-05-30 07:41:52Z ford $ | ||||||||||||||||||||
| 22 | # | ||||||||||||||||||||
| 23 | #======================================================================== | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | package Pod::POM::Node::Head1; | ||||||||||||||||||||
| 26 | 18 | $Pod::POM::Node::Head1::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 parent qw( Pod::POM::Node ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 18 | our @ATTRIBS = ( title => undef ); | |||||||||||||||||||
| 34 | 18 | our @ACCEPT = qw( head2 head3 head4 over begin for text verbatim code ); | |||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | 146 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.1
Pod
undocumented
| |||||||||||||||||||||
| 37 | 146 | my ($class, $pom, $title) = @_; | |||||||||||||||||||
| 38 | 146 | ▶ | $title = $pom->parse_sequence($title) | ||||||||||||||||||
|
Branch: 1 branch
Condition50%1/2
$pom->parse_sequence($title) || (return $class->error($pom->error))
MC/DC0%0/1
$pom->parse_sequence($title) || (return $class->error($pom->error))
$pom->parse_sequence($title)
Truth table50%1/2
A
A= $pom->parse_sequence($title)
| |||||||||||||||||||||
| 39 | || return $class->error($pom->error()) | ||||||||||||||||||||
| 40 | if length $title; | ||||||||||||||||||||
| 41 | 146 | return $class->SUPER::new($pom, $title); | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 18 | 1; | |||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | =head1 NAME | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | Pod::POM::Node::Head1 - | ||||||||||||||||||||
| 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<=head1> elements. | ||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | =head1 AUTHOR | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | Andrew Ford E<lt>a.ford@ford-mason.co.ukE<gt> | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | Andy Wardley E<lt>abw@kfs.orgE<gt> | ||||||||||||||||||||
| 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<Pod::POM::Node> for a discussion of nodes. | ||||||||||||||||||||