1PPI::Document::FragmentU(s3e)r Contributed Perl DocumentaPtPiIo:n:Document::Fragment(3)
2
3
4
6 PPI::Document::Fragment - A fragment of a Perl Document
7
9 In some situations you might want to work with a fragment of a larger
10 document. "PPI::Document::Fragment" is a class intended for this
11 purpose. It is functionally almost identical to a normal
12 PPI::Document, except that it is not possible to get line/column
13 positions for the elements within it, and it does not represent a
14 scope.
15
17 index_locations
18 Unlike when called on a PPI::Document object, you should not be
19 attempting to find locations of things within a
20 PPI::Document::Fragment, and thus any call to the "index_locations"
21 will print a warning and return "undef" instead of attempting to index
22 the locations of the Elements.
23
25 Integrate this into the rest of PPI so it has actual practical uses.
26 The most obvious would be to implement arbitrary cut/copy/paste more
27 easily.
28
30 See the support section in the main module.
31
33 Adam Kennedy <adamk@cpan.org>
34
36 Copyright 2001 - 2011 Adam Kennedy.
37
38 This program is free software; you can redistribute it and/or modify it
39 under the same terms as Perl itself.
40
41 The full text of the license can be found in the LICENSE file included
42 with this module.
43
44
45
46perl v5.32.0 2020-07-28 PPI::Document::Fragment(3)