PPI/Structure/For.pm

filter: Statementstmt 75.0% 12 / 16 Branchbran 25.0% 1 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 58.6% 17 / 29 CC 4 SCAR 18.8
CC
4
Cov
61%
isa
9.3
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
« PPI/Statement/Variable.pm ↑ Summary PPI/Token/_QuoteEngine.pm »
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
BranchTrueFalseTotal
if ($_[1] and $_[1] eq "PPI::Structure::ForLoop") 0 2144 2144
Condition33%1/3
$_[1] and $_[1] eq "PPI::Structure::ForLoop"
!ll&&!rl&&r
021440
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"
ABresult
0X0
100
111
46 0 ▶ unless ( $has_warned ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($has_warned) 0 0 0
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
« PPI/Statement/Variable.pm ↑ Summary PPI/Token/_QuoteEngine.pm »