| 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<PPI::Structure::Block> 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<PPI::Structure::Block> has no methods beyond those provided by the | ||
| 39 | standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods. | ||
| 40 | |||
| 41 | =cut | ||
| 42 | |||
| 43 | 63 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 44 | 63 | ▶ | use PPI::Structure (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 45 | |||
| 46 | 63 | our $VERSION = '1.260'; # VERSION | |
| 47 | |||
| 48 | 63 | 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 | 63 | 1; | |
| 61 | |||
| 62 | =pod | ||
| 63 | |||
| 64 | =head1 SUPPORT | ||
| 65 | |||
| 66 | See the L<support section|PPI/SUPPORT> in the main module. | ||
| 67 | |||
| 68 | =head1 AUTHOR | ||
| 69 | |||
| 70 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||
| 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 | ||