Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Structure.pm |
Statements | Executed 198598 statements in 567ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
11578 | 1 | 1 | 144ms | 735ms | tokens (recurses: max depth 6, inclusive time 664ms) | PPI::Structure::
5789 | 1 | 1 | 71.9ms | 139ms | new | PPI::Structure::
62323 | 3 | 2 | 71.5ms | 71.5ms | start | PPI::Structure::
56534 | 2 | 1 | 66.5ms | 66.5ms | finish | PPI::Structure::
2244 | 4 | 4 | 40.6ms | 116ms | content (recurses: max depth 5, inclusive time 46.0ms) | PPI::Structure::
284 | 1 | 1 | 2.27ms | 2.43ms | braces | PPI::Structure::
1 | 1 | 1 | 247µs | 321µs | BEGIN@109 | PPI::Structure::
23 | 2 | 2 | 218µs | 484µs | location | PPI::Structure::
1 | 1 | 1 | 195µs | 272µs | BEGIN@107 | PPI::Structure::
1 | 1 | 1 | 166µs | 239µs | BEGIN@104 | PPI::Structure::
1 | 1 | 1 | 163µs | 237µs | BEGIN@105 | PPI::Structure::
1 | 1 | 1 | 156µs | 242µs | BEGIN@108 | PPI::Structure::
1 | 1 | 1 | 150µs | 220µs | BEGIN@110 | PPI::Structure::
1 | 1 | 1 | 145µs | 213µs | BEGIN@106 | PPI::Structure::
1 | 1 | 1 | 144µs | 217µs | BEGIN@111 | PPI::Structure::
1 | 1 | 1 | 143µs | 214µs | BEGIN@112 | PPI::Structure::
23 | 1 | 1 | 96µs | 108µs | first_element | PPI::Structure::
1 | 1 | 1 | 13µs | 25µs | BEGIN@91 | PPI::Structure::
1 | 1 | 1 | 9µs | 9µs | BEGIN@98 | PPI::Structure::
1 | 1 | 1 | 9µs | 48µs | BEGIN@97 | PPI::Structure::
1 | 1 | 1 | 7µs | 29µs | BEGIN@93 | PPI::Structure::
1 | 1 | 1 | 3µs | 3µs | BEGIN@92 | PPI::Structure::
1 | 1 | 1 | 3µs | 3µs | BEGIN@95 | PPI::Structure::
1 | 1 | 1 | 3µs | 3µs | BEGIN@94 | PPI::Structure::
0 | 0 | 0 | 0s | 0s | _complete | PPI::Structure::
0 | 0 | 0 | 0s | 0s | complete | PPI::Structure::
0 | 0 | 0 | 0s | 0s | elements | PPI::Structure::
0 | 0 | 0 | 0s | 0s | insert_after | PPI::Structure::
0 | 0 | 0 | 0s | 0s | insert_before | PPI::Structure::
0 | 0 | 0 | 0s | 0s | last_element | PPI::Structure::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package PPI::Structure; | ||||
2 | |||||
3 | =pod | ||||
4 | |||||
5 | =head1 NAME | ||||
6 | |||||
7 | PPI::Structure - The base class for Perl braced structures | ||||
8 | |||||
9 | =head1 INHERITANCE | ||||
10 | |||||
11 | PPI::Structure | ||||
12 | isa PPI::Node | ||||
13 | isa PPI::Element | ||||
14 | |||||
15 | =head1 DESCRIPTION | ||||
16 | |||||
17 | PPI::Structure is the root class for all Perl bracing structures. This | ||||
18 | covers all forms of C< [ ... ] >, C< { ... } >, and C< ( ... ) > brace | ||||
19 | types, and includes cases where only one half of the pair exist. | ||||
20 | |||||
21 | The class PPI::Structure itself is full abstract and no objects of that | ||||
22 | type should actually exist in the tree. | ||||
23 | |||||
24 | =head2 Elements vs Children | ||||
25 | |||||
26 | A B<PPI::Structure> has an unusual existance. Unlike a L<PPI::Document> | ||||
27 | or L<PPI::Statement>, which both simply contain other elements, a | ||||
28 | structure B<both> contains and consists of content. | ||||
29 | |||||
30 | That is, the brace tokens are B<not> considered to be "children" of the | ||||
31 | structure, but are part of it. | ||||
32 | |||||
33 | In practice, this will mean that while the -E<gt>elements and -E<gt>tokens | ||||
34 | methods (and related) B<will> return a list with the brace tokens at either | ||||
35 | end, the -E<gt>children method explicitly will B<not> return the brace. | ||||
36 | |||||
37 | =head1 STRUCTURE CLASSES | ||||
38 | |||||
39 | Excluding the transient L<PPI::Structure::Unknown> that exists briefly | ||||
40 | inside the parser, there are eight types of structure. | ||||
41 | |||||
42 | =head2 L<PPI::Structure::List> | ||||
43 | |||||
44 | This covers all round braces used for function arguments, in C<foreach> | ||||
45 | loops, literal lists, and braces used for precedence-ordering purposes. | ||||
46 | |||||
47 | =head2 L<PPI::Structure::For> | ||||
48 | |||||
49 | Although B<not> used for the C<foreach> loop list, this B<is> used for | ||||
50 | the special case of the round-brace three-part semicolon-seperated C<for> | ||||
51 | loop expression (the traditional C style for loop). | ||||
52 | |||||
53 | =head2 L<PPI::Structure::Given> | ||||
54 | |||||
55 | This is for the expression being matched in switch statements. | ||||
56 | |||||
57 | =head2 L<PPI::Structure::When> | ||||
58 | |||||
59 | This is for the matching expression in "when" statements. | ||||
60 | |||||
61 | =head2 L<PPI::Structure::Condition> | ||||
62 | |||||
63 | This round-brace structure covers boolean conditional braces, such as | ||||
64 | for C<if> and C<while> blocks. | ||||
65 | |||||
66 | =head2 L<PPI::Structure::Block> | ||||
67 | |||||
68 | This curly-brace and common structure is used for all form of code | ||||
69 | blocks. This includes those for C<if>, C<do> and similar, as well | ||||
70 | as C<grep>, C<map>, C<sort>, C<sub> and (labelled or anonymous) | ||||
71 | scoping blocks. | ||||
72 | |||||
73 | =head2 L<PPI::Structure::Constructor> | ||||
74 | |||||
75 | This class covers brace structures used for the construction of | ||||
76 | anonymous C<ARRAY> and C<HASH> references. | ||||
77 | |||||
78 | =head2 L<PPI::Structure::Subscript> | ||||
79 | |||||
80 | This class covers square-braces and curly-braces used after a | ||||
81 | -E<gt> pointer to access the subscript of an C<ARRAY> or C<HASH>. | ||||
82 | |||||
83 | =head1 METHODS | ||||
84 | |||||
85 | C<PPI::Structure> itself has very few methods. Most of the time, you will be | ||||
86 | working with the more generic L<PPI::Element> or L<PPI::Node> methods, or one | ||||
87 | of the methods that are subclass-specific. | ||||
88 | |||||
89 | =cut | ||||
90 | |||||
91 | 2 | 19µs | 2 | 38µs | # spent 25µs (13+12) within PPI::Structure::BEGIN@91 which was called:
# once (13µs+12µs) by PPI::BEGIN@22 at line 91 # spent 25µs making 1 call to PPI::Structure::BEGIN@91
# spent 12µs making 1 call to strict::import |
92 | 2 | 18µs | 1 | 3µs | # spent 3µs within PPI::Structure::BEGIN@92 which was called:
# once (3µs+0s) by PPI::BEGIN@22 at line 92 # spent 3µs making 1 call to PPI::Structure::BEGIN@92 |
93 | 2 | 18µs | 2 | 52µs | # spent 29µs (7+23) within PPI::Structure::BEGIN@93 which was called:
# once (7µs+23µs) by PPI::BEGIN@22 at line 93 # spent 29µs making 1 call to PPI::Structure::BEGIN@93
# spent 23µs making 1 call to Exporter::import |
94 | 2 | 15µs | 1 | 3µs | # spent 3µs within PPI::Structure::BEGIN@94 which was called:
# once (3µs+0s) by PPI::BEGIN@22 at line 94 # spent 3µs making 1 call to PPI::Structure::BEGIN@94 |
95 | 2 | 24µs | 1 | 3µs | # spent 3µs within PPI::Structure::BEGIN@95 which was called:
# once (3µs+0s) by PPI::BEGIN@22 at line 95 # spent 3µs making 1 call to PPI::Structure::BEGIN@95 |
96 | |||||
97 | 2 | 33µs | 2 | 86µs | # spent 48µs (9+39) within PPI::Structure::BEGIN@97 which was called:
# once (9µs+39µs) by PPI::BEGIN@22 at line 97 # spent 48µs making 1 call to PPI::Structure::BEGIN@97
# spent 39µs making 1 call to vars::import |
98 | # spent 9µs within PPI::Structure::BEGIN@98 which was called:
# once (9µs+0s) by PPI::BEGIN@22 at line 102 | ||||
99 | 1 | 300ns | $VERSION = '1.215'; | ||
100 | 1 | 5µs | @ISA = 'PPI::Node'; | ||
101 | 1 | 4µs | *_PARENT = *PPI::Element::_PARENT; | ||
102 | 1 | 14µs | 1 | 9µs | } # spent 9µs making 1 call to PPI::Structure::BEGIN@98 |
103 | |||||
104 | 2 | 106µs | 1 | 239µs | # spent 239µs (166+73) within PPI::Structure::BEGIN@104 which was called:
# once (166µs+73µs) by PPI::BEGIN@22 at line 104 # spent 239µs making 1 call to PPI::Structure::BEGIN@104 |
105 | 2 | 93µs | 1 | 237µs | # spent 237µs (163+74) within PPI::Structure::BEGIN@105 which was called:
# once (163µs+74µs) by PPI::BEGIN@22 at line 105 # spent 237µs making 1 call to PPI::Structure::BEGIN@105 |
106 | 2 | 88µs | 1 | 213µs | # spent 213µs (145+68) within PPI::Structure::BEGIN@106 which was called:
# once (145µs+68µs) by PPI::BEGIN@22 at line 106 # spent 213µs making 1 call to PPI::Structure::BEGIN@106 |
107 | 2 | 86µs | 1 | 272µs | # spent 272µs (195+77) within PPI::Structure::BEGIN@107 which was called:
# once (195µs+77µs) by PPI::BEGIN@22 at line 107 # spent 272µs making 1 call to PPI::Structure::BEGIN@107 |
108 | 2 | 93µs | 1 | 242µs | # spent 242µs (156+86) within PPI::Structure::BEGIN@108 which was called:
# once (156µs+86µs) by PPI::BEGIN@22 at line 108 # spent 242µs making 1 call to PPI::Structure::BEGIN@108 |
109 | 2 | 89µs | 1 | 321µs | # spent 321µs (247+74) within PPI::Structure::BEGIN@109 which was called:
# once (247µs+74µs) by PPI::BEGIN@22 at line 109 # spent 321µs making 1 call to PPI::Structure::BEGIN@109 |
110 | 2 | 92µs | 1 | 220µs | # spent 220µs (150+71) within PPI::Structure::BEGIN@110 which was called:
# once (150µs+71µs) by PPI::BEGIN@22 at line 110 # spent 220µs making 1 call to PPI::Structure::BEGIN@110 |
111 | 2 | 91µs | 1 | 217µs | # spent 217µs (144+73) within PPI::Structure::BEGIN@111 which was called:
# once (144µs+73µs) by PPI::BEGIN@22 at line 111 # spent 217µs making 1 call to PPI::Structure::BEGIN@111 |
112 | 2 | 613µs | 1 | 214µs | # spent 214µs (143+71) within PPI::Structure::BEGIN@112 which was called:
# once (143µs+71µs) by PPI::BEGIN@22 at line 112 # spent 214µs making 1 call to PPI::Structure::BEGIN@112 |
113 | |||||
- - | |||||
118 | ##################################################################### | ||||
119 | # Constructor | ||||
120 | |||||
121 | # spent 139ms (71.9+67.6) within PPI::Structure::new which was called 5789 times, avg 24µs/call:
# 5789 times (71.9ms+67.6ms) by PPI::Lexer::_lex_statement at line 650 of PPI/Lexer.pm, avg 24µs/call | ||||
122 | 5789 | 1.82ms | my $class = shift; | ||
123 | 5789 | 12.8ms | 5789 | 55.8ms | my $Token = PPI::Token::__LEXER__opens($_[0]) ? shift : return undef; # spent 55.8ms making 5789 calls to PPI::Token::__LEXER__opens, avg 10µs/call |
124 | |||||
125 | # Create the object | ||||
126 | 5789 | 12.3ms | my $self = bless { | ||
127 | children => [], | ||||
128 | start => $Token, | ||||
129 | }, $class; | ||||
130 | |||||
131 | # Set the start braces parent link | ||||
132 | 5789 | 37.9ms | 11578 | 11.8ms | Scalar::Util::weaken( # spent 6.88ms making 5789 calls to Scalar::Util::weaken, avg 1µs/call
# spent 4.95ms making 5789 calls to Scalar::Util::refaddr, avg 854ns/call |
133 | $_PARENT{Scalar::Util::refaddr $Token} = $self | ||||
134 | ); | ||||
135 | |||||
136 | 5789 | 11.6ms | $self; | ||
137 | } | ||||
138 | |||||
- - | |||||
143 | ##################################################################### | ||||
144 | # PPI::Structure API methods | ||||
145 | |||||
146 | =pod | ||||
147 | |||||
148 | =head2 start | ||||
149 | |||||
150 | For lack of better terminology (like "open" and "close") that has not | ||||
151 | already in use for some other more important purpose, the two individual | ||||
152 | braces for the structure are known within PPI as the "start" and "finish" | ||||
153 | braces (at least for method purposes). | ||||
154 | |||||
155 | The C<start> method returns the start brace for the structure (i.e. the | ||||
156 | opening brace). | ||||
157 | |||||
158 | Returns the brace as a L<PPI::Token::Structure> or C<undef> if the | ||||
159 | structure does not have a starting brace. | ||||
160 | |||||
161 | Under normal parsing circumstances this should never occur, but may happen | ||||
162 | due to manipulation of the PDOM tree. | ||||
163 | |||||
164 | =cut | ||||
165 | |||||
166 | 62323 | 168ms | # spent 71.5ms within PPI::Structure::start which was called 62323 times, avg 1µs/call:
# 45436 times (50.8ms+0s) by PPI::Node::find at line 395 of PPI/Node.pm, avg 1µs/call
# 11098 times (12.6ms+0s) by PPI::Node::find_first at line 452 of PPI/Node.pm, avg 1µs/call
# 5789 times (8.13ms+0s) by PPI::Lexer::_lex_structure at line 1356 of PPI/Lexer.pm, avg 1µs/call | ||
167 | |||||
168 | =pod | ||||
169 | |||||
170 | =head2 finish | ||||
171 | |||||
172 | The C<finish> method returns the finish brace for the structure (i.e. the | ||||
173 | closing brace). | ||||
174 | |||||
175 | Returns the brace as a L<PPI::Token::Structure> or C<undef> if the | ||||
176 | structure does not have a finishing brace. This can be quite common if | ||||
177 | the document is not complete (for example, from an editor where the user | ||||
178 | may be halfway through typeing a subroutine). | ||||
179 | |||||
180 | =cut | ||||
181 | |||||
182 | 56534 | 134ms | # spent 66.5ms within PPI::Structure::finish which was called 56534 times, avg 1µs/call:
# 45436 times (53.3ms+0s) by PPI::Node::find at line 393 of PPI/Node.pm, avg 1µs/call
# 11098 times (13.2ms+0s) by PPI::Node::find_first at line 450 of PPI/Node.pm, avg 1µs/call | ||
183 | |||||
184 | =pod | ||||
185 | |||||
186 | =head2 braces | ||||
187 | |||||
188 | The C<braces> method is a utility method which returns the brace type, | ||||
189 | regardless of whether has both braces defined, or just the starting | ||||
190 | brace, or just the ending brace. | ||||
191 | |||||
192 | Returns on of the three strings C<'[]'>, C<'{}'>, or C<'()'>, or C<undef> | ||||
193 | on error (primarily not having a start brace, as mentioned above). | ||||
194 | |||||
195 | =cut | ||||
196 | |||||
197 | # spent 2.43ms (2.27+162µs) within PPI::Structure::braces which was called 284 times, avg 9µs/call:
# 284 times (2.27ms+162µs) by PPI::Lexer::_continues at line 805 of PPI/Lexer.pm, avg 9µs/call | ||||
198 | 284 | 1.04ms | 284 | 162µs | my $self = $_[0]->{start} ? shift : return undef; # spent 162µs making 284 calls to PPI::Util::TRUE, avg 571ns/call |
199 | return { | ||||
200 | 284 | 1.58ms | '[' => '[]', | ||
201 | '(' => '()', | ||||
202 | '{' => '{}', | ||||
203 | }->{ $self->{start}->{content} }; | ||||
204 | } | ||||
205 | |||||
206 | =pod | ||||
207 | |||||
208 | =head1 complete | ||||
209 | |||||
210 | The C<complete> method is a convenience method that returns true if | ||||
211 | the both braces are defined for the structure, or false if only one | ||||
212 | brace is defined. | ||||
213 | |||||
214 | Unlike the top level C<complete> method which checks for completeness | ||||
215 | in depth, the structure complete method ONLY confirms completeness | ||||
216 | for the braces, and does not recurse downwards. | ||||
217 | |||||
218 | =cut | ||||
219 | |||||
220 | sub complete { | ||||
221 | !! ($_[0]->{start} and $_[0]->{finish}); | ||||
222 | } | ||||
223 | |||||
- - | |||||
228 | ##################################################################### | ||||
229 | # PPI::Node overloaded methods | ||||
230 | |||||
231 | # For us, the "elements" concept includes the brace tokens | ||||
232 | sub elements { | ||||
233 | my $self = shift; | ||||
234 | |||||
235 | if ( wantarray ) { | ||||
236 | # Return a list in array context | ||||
237 | return ( $self->{start} || (), @{$self->{children}}, $self->{finish} || () ); | ||||
238 | } else { | ||||
239 | # Return the number of elements in scalar context. | ||||
240 | # This is memory-cheaper than creating another big array | ||||
241 | return scalar(@{$self->{children}}) | ||||
242 | + ($self->{start} ? 1 : 0) | ||||
243 | + ($self->{finish} ? 1 : 0); | ||||
244 | } | ||||
245 | } | ||||
246 | |||||
247 | # For us, the first element is probably the opening brace | ||||
248 | # spent 108µs (96+12) within PPI::Structure::first_element which was called 23 times, avg 5µs/call:
# 23 times (96µs+12µs) by PPI::Structure::location at line 264, avg 5µs/call | ||||
249 | # Technically, if we have no children and no opening brace, | ||||
250 | # then the first element is the closing brace. | ||||
251 | 23 | 126µs | 23 | 12µs | $_[0]->{start} or $_[0]->{children}->[0] or $_[0]->{finish}; # spent 12µs making 23 calls to PPI::Util::TRUE, avg 513ns/call |
252 | } | ||||
253 | |||||
254 | # For us, the last element is probably the closing brace | ||||
255 | sub last_element { | ||||
256 | # Technically, if we have no children and no closing brace, | ||||
257 | # then the last element is the opening brace | ||||
258 | $_[0]->{finish} or $_[0]->{children}->[-1] or $_[0]->{start}; | ||||
259 | } | ||||
260 | |||||
261 | # Location is same as the start token, if any | ||||
262 | # spent 484µs (218+266) within PPI::Structure::location which was called 23 times, avg 21µs/call:
# 15 times (140µs+164µs) by PPI::Element::logical_line_number at line 932 of PPI/Element.pm, avg 20µs/call
# 8 times (78µs+102µs) by PPI::Node::location at line 685 of PPI/Node.pm, avg 23µs/call | ||||
263 | 23 | 9µs | my $self = shift; | ||
264 | 23 | 109µs | 46 | 121µs | my $first = $self->first_element or return undef; # spent 108µs making 23 calls to PPI::Structure::first_element, avg 5µs/call
# spent 13µs making 23 calls to PPI::Util::TRUE, avg 548ns/call |
265 | 23 | 85µs | 23 | 145µs | $first->location; # spent 145µs making 23 calls to PPI::Element::location, avg 6µs/call |
266 | } | ||||
267 | |||||
- - | |||||
272 | ##################################################################### | ||||
273 | # PPI::Element overloaded methods | ||||
274 | |||||
275 | # Get the full set of tokens, including start and finish | ||||
276 | # spent 735ms (144+591) within PPI::Structure::tokens which was called 11578 times, avg 64µs/call:
# 11578 times (144ms+591ms) by PPI::Node::tokens at line 666 of PPI/Node.pm, avg 64µs/call | ||||
277 | 11578 | 2.52ms | my $self = shift; | ||
278 | 11578 | 109ms | 34734 | 13.2ms | my @tokens = ( # spent 13.2ms making 23156 calls to PPI::Util::TRUE, avg 569ns/call
# spent 1.24s making 11578 calls to PPI::Node::tokens, avg 107µs/call, recursion: max depth 14, sum of overlapping time 1.24s |
279 | $self->{start} || (), | ||||
280 | $self->SUPER::tokens(@_), | ||||
281 | $self->{finish} || (), | ||||
282 | ); | ||||
283 | 11578 | 37.2ms | @tokens; | ||
284 | } | ||||
285 | |||||
286 | # Like the token method ->content, get our merged contents. | ||||
287 | # This will recurse downwards through everything | ||||
288 | ### Reimplement this using List::Utils stuff | ||||
289 | # spent 116ms (40.6+75.0) within PPI::Structure::content which was called 2244 times, avg 51µs/call:
# 945 times (16.3ms+22.8ms) by Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations::_is_conditional at line 50 of Perl/Critic/Policy/Variables/ProhibitConditionalDeclarations.pm, avg 41µs/call
# 724 times (11.8ms+-11.7ms) by PPI::Node::content at line 671 of PPI/Node.pm, avg 110ns/call
# 568 times (12.0ms+58.2ms) by PPI::Lexer::_curly at line 1190 of PPI/Lexer.pm, avg 124µs/call
# 7 times (435µs+5.75ms) by PPI::Statement::Compound::type at line 202 of PPI/Statement/Compound.pm, avg 883µs/call | ||||
290 | 2244 | 501µs | my $self = shift; | ||
291 | 2244 | 9.99ms | 4488 | 4.24ms | my $content = $self->{start} ? $self->{start}->content : ''; # spent 2.97ms making 2244 calls to PPI::Token::content, avg 1µs/call
# spent 1.27ms making 2244 calls to PPI::Util::TRUE, avg 564ns/call |
292 | 2244 | 1.90ms | foreach my $child ( @{$self->{children}} ) { | ||
293 | 4148 | 8.75ms | 4148 | 81.8ms | $content .= $child->content; # spent 110ms making 1929 calls to PPI::Node::content, avg 57µs/call, recursion: max depth 5, sum of overlapping time 30.8ms
# spent 3.02ms making 2219 calls to PPI::Token::content, avg 1µs/call |
294 | } | ||||
295 | 2244 | 9.33ms | 4488 | 4.18ms | $content .= $self->{finish}->content if $self->{finish}; # spent 2.87ms making 2244 calls to PPI::Token::content, avg 1µs/call
# spent 1.31ms making 2244 calls to PPI::Util::TRUE, avg 586ns/call |
296 | 2244 | 4.83ms | $content; | ||
297 | } | ||||
298 | |||||
299 | # Is the structure completed | ||||
300 | sub _complete { | ||||
301 | !! ( defined $_[0]->{finish} ); | ||||
302 | } | ||||
303 | |||||
304 | # You can insert either another structure, or a token | ||||
305 | sub insert_before { | ||||
306 | my $self = shift; | ||||
307 | my $Element = _INSTANCE(shift, 'PPI::Element') or return undef; | ||||
308 | if ( $Element->isa('PPI::Structure') ) { | ||||
309 | return $self->__insert_before($Element); | ||||
310 | } elsif ( $Element->isa('PPI::Token') ) { | ||||
311 | return $self->__insert_before($Element); | ||||
312 | } | ||||
313 | ''; | ||||
314 | } | ||||
315 | |||||
316 | # As above, you can insert either another structure, or a token | ||||
317 | sub insert_after { | ||||
318 | my $self = shift; | ||||
319 | my $Element = _INSTANCE(shift, 'PPI::Element') or return undef; | ||||
320 | if ( $Element->isa('PPI::Structure') ) { | ||||
321 | return $self->__insert_after($Element); | ||||
322 | } elsif ( $Element->isa('PPI::Token') ) { | ||||
323 | return $self->__insert_after($Element); | ||||
324 | } | ||||
325 | ''; | ||||
326 | } | ||||
327 | |||||
328 | 1 | 2µs | 1; | ||
329 | |||||
330 | =pod | ||||
331 | |||||
332 | =head1 SUPPORT | ||||
333 | |||||
334 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
335 | |||||
336 | =head1 AUTHOR | ||||
337 | |||||
338 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
339 | |||||
340 | =head1 COPYRIGHT | ||||
341 | |||||
342 | Copyright 2001 - 2011 Adam Kennedy. | ||||
343 | |||||
344 | This program is free software; you can redistribute | ||||
345 | it and/or modify it under the same terms as Perl itself. | ||||
346 | |||||
347 | The full text of the license can be found in the | ||||
348 | LICENSE file included with this module. | ||||
349 | |||||
350 | =cut |