1Pod::Simple::LinkSectioUns(e3r)Contributed Perl DocumentPaotdi:o:nSimple::LinkSection(3)
2
3
4
6 Pod::Simple::LinkSection -- represent "section" attributes of L codes
7
9 # a long story
10
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
53 Pod::Simple
54
56 Copyright (c) 2002 Sean M. Burke. All rights reserved.
57
58 This library is free software; you can redistribute it and/or modify it
59 under the same terms as Perl itself.
60
61 This program is distributed in the hope that it will be useful, but
62 without any warranty; without even the implied warranty of mer‐
63 chantability or fitness for a particular purpose.
64
66 Sean M. Burke "sburke@cpan.org"
67
68
69
70perl v5.8.8 2003-11-02 Pod::Simple::LinkSection(3)