line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PPI::Structure::For; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
PPI::Structure::For - Circular braces for a for expression |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
for ( var $i = 0; $i < $max; $i++ ) { |
12
|
|
|
|
|
|
|
... |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 INHERITANCE |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
PPI::Structure::For |
18
|
|
|
|
|
|
|
isa PPI::Structure |
19
|
|
|
|
|
|
|
isa PPI::Node |
20
|
|
|
|
|
|
|
isa PPI::Element |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
C is the class used for circular braces that |
25
|
|
|
|
|
|
|
contain the three part C expression. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 METHODS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
C has no methods beyond those provided by the |
30
|
|
|
|
|
|
|
standard L, L and L methods. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
64
|
|
|
64
|
|
348
|
use strict; |
|
64
|
|
|
|
|
126
|
|
|
64
|
|
|
|
|
1573
|
|
35
|
64
|
|
|
64
|
|
264
|
use PPI::Structure (); |
|
64
|
|
|
|
|
108
|
|
|
64
|
|
|
|
|
6694
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
our $VERSION = '1.276'; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
our @ISA = "PPI::Structure"; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# Highly special custom isa method that will continue to respond |
42
|
|
|
|
|
|
|
# positively to ->isa('PPI::Structure::ForLoop') but warns. |
43
|
|
|
|
|
|
|
my $has_warned = 0; |
44
|
|
|
|
|
|
|
sub isa { |
45
|
2145
|
50
|
33
|
2145
|
0
|
5498
|
if ( $_[1] and $_[1] eq 'PPI::Structure::ForLoop' ) { |
46
|
0
|
0
|
|
|
|
0
|
unless ( $has_warned ) { |
47
|
0
|
|
|
|
|
0
|
warn("PPI::Structure::ForLoop has been deprecated"); |
48
|
0
|
|
|
|
|
0
|
$has_warned = 1; |
49
|
|
|
|
|
|
|
} |
50
|
0
|
|
|
|
|
0
|
return 1; |
51
|
|
|
|
|
|
|
} |
52
|
2145
|
|
|
|
|
7965
|
return shift->SUPER::isa(@_); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=pod |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SUPPORT |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
See the L in the main module. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Copyright 2001 - 2011 Adam Kennedy. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This program is free software; you can redistribute |
72
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
The full text of the license can be found in the |
75
|
|
|
|
|
|
|
LICENSE file included with this module. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |