| 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<PPI::Structure::For> is the class used for circular braces that | ||||||||||||||||||||||||||||
| 25 | contain the three part C<for> expression. | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | =head1 METHODS | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | C<PPI::Structure::For> has no methods beyond those provided by the | ||||||||||||||||||||||||||||
| 30 | standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods. | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | =cut | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 63 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 35 | 63 | ▶ | use PPI::Structure (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 63 | our $VERSION = '1.260'; # VERSION | |||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 63 | 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 | 63 | my $has_warned = 0; | |||||||||||||||||||||||||||
| 44 | sub isa { | ||||||||||||||||||||||||||||
| 45 | 2144 | ▶ | if ( $_[1] and $_[1] eq 'PPI::Structure::ForLoop' ) { | ||||||||||||||||||||||||||
|
Subroutine
isa: called CC=4 SCAR=22.3
Pod
undocumented
Branch: 1 branch
Condition33%1/3
$_[1] and $_[1] eq "PPI::Structure::ForLoop"
MC/DC0%0/2
$_[1] and $_[1] eq "PPI::Structure::ForLoop"
$_[1]
$_[1] eq "PPI::Structure::ForLoop"
Truth table33%1/3
A and B
A= $_[1]B= $_[1] eq "PPI::Structure::ForLoop"
| |||||||||||||||||||||||||||||
| 46 | 0 | ▶ | unless ( $has_warned ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 47 | 0 | warn("PPI::Structure::ForLoop has been deprecated"); | |||||||||||||||||||||||||||
| 48 | 0 | $has_warned = 1; | |||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||
| 50 | 0 | return 1; | |||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||
| 52 | 2144 | return shift->SUPER::isa(@_); | |||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | 63 | 1; | |||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | =pod | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | =head1 SUPPORT | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | See the L<support section|PPI/SUPPORT> in the main module. | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||||||||||||||||||||||||||
| 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 | ||||||||||||||||||||||||||||