1 #============================================================= -*-Perl-*-
6 # Module implementing specific nodes in a Pod::POM, subclassed from
10 # Andy Wardley <abw@kfs.org>
11 # Andrew Ford <a.ford@ford-mason.co.uk>
14 # Copyright (C) 2000, 2001 Andy Wardley. All Rights Reserved.
15 # Copyright (C) 2009 Andrew Ford. All Rights Reserved.
17 # This module is free software; you can redistribute it and/or
18 # modify it under the same terms as Perl itself.
21 # $Id: Text.pm 76 2009-08-20 20:41:33Z ford $
23 #========================================================================
25 package BASIS::Pod::POM::Node::Text;
29 use BASIS::Pod::POM::Constants qw( :all );
30 use parent qw( BASIS::Pod::POM::Node );
31 use vars qw( %ATTRIBS $ERROR );
33 %ATTRIBS = ( text => '' );
39 $text = $pom->parse_sequence($text)
40 || return $class->error($pom->error())
41 if length $text && ! $pom->{in_begin};
42 return $class->SUPER::new($pom, $text);
50 my ($self, $view) = @_;
51 my $text = $self->{ text };
52 $view ||= $BASIS::Pod::POM::DEFAULT_VIEW;
54 $text = $text->present($view)
57 return $view->view_textblock($text);
64 Pod::POM::Node::Text -
72 This module implements a specialization of the node class to represent text elements.
76 Andrew Ford E<lt>a.ford@ford-mason.co.ukE<gt>
78 Andy Wardley E<lt>abw@kfs.orgE<gt>
82 Copyright (C) 2000, 2001 Andy Wardley. All Rights Reserved.
84 Copyright (C) 2009 Andrew Ford. All Rights Reserved.
86 This module is free software; you can redistribute it and/or
87 modify it under the same terms as Perl itself.
91 Consult L<Pod::POM::Node> for a discussion of nodes.