1Pod::Simple::LinkSectioUns(e3r)Contributed Perl DocumentPaotdi:o:nSimple::LinkSection(3)
2
3
4

NAME

6       Pod::Simple::LinkSection -- represent "section" attributes of L codes
7

SYNOPSIS

9        # a long story
10

DESCRIPTION

12       This class is not of interest to general users.
13
14       Pod::Simple uses this class for representing the value of the "section"
15       attribute of "L" start-element events.  Most applications can just use
16       the normal stringification of objects of this class; they stringify to
17       just the text content of the section, such as "foo" for "L<Stuff/foo>",
18       and "bar" for "L<Stuff/bI<ar>>".
19
20       However, anyone particularly interested in getting the full value of
21       the treelet, can just traverse the content of the treeleet
22       @$treelet_object.  To wit:
23
24         % perl -MData::Dumper -e
25           "use base qw(Pod::Simple::Methody);
26            sub start_L { print Dumper($_[1]{'section'} ) }
27            __PACKAGE__->new->parse_string_document('=head1 L<Foo/bI<ar>baz>>')
28           "
29       Output:
30         $VAR1 = bless( [
31                          '',
32                          {},
33                          'b',
34                          bless( [
35                                   'I',
36                                   {},
37                                   'ar'
38                                 ], 'Pod::Simple::LinkSection' ),
39                          'baz'
40                        ], 'Pod::Simple::LinkSection' );
41
42       But stringify it and you get just the text content:
43
44         % perl -MData::Dumper -e
45           "use base qw(Pod::Simple::Methody);
46            sub start_L { print Dumper( '' . $_[1]{'section'} ) }
47            __PACKAGE__->new->parse_string_document('=head1 L<Foo/bI<ar>baz>>')
48           "
49       Output:
50         $VAR1 = 'barbaz';
51

SEE ALSO

53       Pod::Simple
54

SUPPORT

56       Questions or discussion about POD and Pod::Simple should be sent to the
57       pod-people@perl.org mail list. Send an empty email to
58       pod-people-subscribe@perl.org to subscribe.
59
60       This module is managed in an open GitHub repository,
61       <https://github.com/perl-pod/pod-simple/>. Feel free to fork and
62       contribute, or to clone <https://github.com/perl-pod/pod-simple.git>
63       and send patches!
64
65       Patches against Pod::Simple are welcome. Please send bug reports to
66       <bug-pod-simple@rt.cpan.org>.
67
69       Copyright (c) 2004 Sean M. Burke.
70
71       This library is free software; you can redistribute it and/or modify it
72       under the same terms as Perl itself.
73
74       This program is distributed in the hope that it will be useful, but
75       without any warranty; without even the implied warranty of
76       merchantability or fitness for a particular purpose.
77

AUTHOR

79       Pod::Simple was created by Sean M. Burke <sburke@cpan.org>.  But don't
80       bother him, he's retired.
81
82       Pod::Simple is maintained by:
83
84       •   Allison Randal "allison@perl.org"
85
86       •   Hans Dieter Pearcey "hdp@cpan.org"
87
88       •   David E. Wheeler "dwheeler@cpan.org"
89
90
91
92perl v5.38.0                      2023-07-21       Pod::Simple::LinkSection(3)
Impressum