line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PPI::Structure::Block; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
PPI::Structure::Block - Curly braces representing a code block |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub foo { ... } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
grep { ... } @list; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
if ( condition ) { |
16
|
|
|
|
|
|
|
... |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
LABEL: { |
20
|
|
|
|
|
|
|
... |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 INHERITANCE |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
PPI::Structure::Block |
26
|
|
|
|
|
|
|
isa PPI::Structure |
27
|
|
|
|
|
|
|
isa PPI::Node |
28
|
|
|
|
|
|
|
isa PPI::Element |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 DESCRIPTION |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
C is the class used for all curly braces that |
33
|
|
|
|
|
|
|
represent code blocks. This includes subroutines, compound statements |
34
|
|
|
|
|
|
|
and any other block braces. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 METHODS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
C has no methods beyond those provided by the |
39
|
|
|
|
|
|
|
standard L, L and L methods. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
63
|
|
|
63
|
|
352
|
use strict; |
|
63
|
|
|
|
|
98
|
|
|
63
|
|
|
|
|
1476
|
|
44
|
63
|
|
|
63
|
|
270
|
use PPI::Structure (); |
|
63
|
|
|
|
|
102
|
|
|
63
|
|
|
|
|
3800
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
our $VERSION = '1.275'; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
our @ISA = "PPI::Structure"; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
##################################################################### |
55
|
|
|
|
|
|
|
# PPI::Element Methods |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# This is a scope boundary |
58
|
|
|
|
|
|
|
sub scope() { 1 } |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=pod |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SUPPORT |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
See the L in the main module. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 AUTHOR |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 COPYRIGHT |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Copyright 2001 - 2011 Adam Kennedy. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This program is free software; you can redistribute |
77
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
The full text of the license can be found in the |
80
|
|
|
|
|
|
|
LICENSE file included with this module. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |