line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#============================================================= -*-Perl-*- |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Pod::POM::Node::Text |
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: Text.pm 89 2013-05-30 07:41:52Z ford $ |
22
|
|
|
|
|
|
|
# |
23
|
|
|
|
|
|
|
#======================================================================== |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
package Pod::POM::Node::Text; |
26
|
|
|
|
|
|
|
$Pod::POM::Node::Text::VERSION = '2.00'; |
27
|
|
|
|
|
|
|
require 5.006; |
28
|
18
|
|
|
18
|
|
73
|
use strict; |
|
18
|
|
|
|
|
28
|
|
|
18
|
|
|
|
|
376
|
|
29
|
18
|
|
|
18
|
|
71
|
use warnings; |
|
18
|
|
|
|
|
26
|
|
|
18
|
|
|
|
|
463
|
|
30
|
|
|
|
|
|
|
|
31
|
18
|
|
|
18
|
|
88
|
use Pod::POM::Constants qw( :all ); |
|
18
|
|
|
|
|
24
|
|
|
18
|
|
|
|
|
2665
|
|
32
|
18
|
|
|
18
|
|
112
|
use parent qw( Pod::POM::Node ); |
|
18
|
|
|
|
|
25
|
|
|
18
|
|
|
|
|
76
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
our @ATTRIBS = ( text => '' ); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new { |
37
|
367
|
|
|
367
|
0
|
478
|
my $class = shift; |
38
|
367
|
|
|
|
|
406
|
my $pom = shift; |
39
|
367
|
|
|
|
|
410
|
my $text = shift; |
40
|
|
|
|
|
|
|
$text = $pom->parse_sequence($text) |
41
|
|
|
|
|
|
|
|| return $class->error($pom->error()) |
42
|
367
|
100
|
50
|
|
|
2109
|
if length $text && ! $pom->{in_begin}; |
|
|
|
66
|
|
|
|
|
43
|
367
|
|
|
|
|
1089
|
return $class->SUPER::new($pom, $text); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub add { |
47
|
322
|
|
|
322
|
0
|
590
|
return IGNORE; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub present { |
51
|
268
|
|
|
268
|
0
|
376
|
my ($self, $view) = @_; |
52
|
268
|
|
|
|
|
382
|
my $text = $self->{ text }; |
53
|
268
|
|
66
|
|
|
480
|
$view ||= $Pod::POM::DEFAULT_VIEW; |
54
|
|
|
|
|
|
|
|
55
|
268
|
100
|
|
|
|
846
|
$text = $text->present($view) |
56
|
|
|
|
|
|
|
if ref $text; |
57
|
|
|
|
|
|
|
|
58
|
268
|
|
|
|
|
881
|
return $view->view_textblock($text); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 NAME |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Pod::POM::Node::Text - |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 SYNOPSIS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
use Pod::POM::Nodes; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 DESCRIPTION |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This module implements a specialization of the node class to represent text elements. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHOR |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Andrew Ford Ea.ford@ford-mason.co.ukE |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Andy Wardley Eabw@kfs.orgE |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 COPYRIGHT |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Copyright (C) 2000, 2001 Andy Wardley. All Rights Reserved. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Copyright (C) 2009 Andrew Ford. All Rights Reserved. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or |
88
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 SEE ALSO |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Consult L for a discussion of nodes. |