Commit | Line | Data |
3fea05b9 |
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 | Got any ideas for methods? Submit a report to rt.cpan.org! |
33 | |
34 | =cut |
35 | |
36 | use strict; |
37 | use PPI::Structure (); |
38 | |
39 | use vars qw{$VERSION @ISA}; |
40 | BEGIN { |
41 | $VERSION = '1.206'; |
42 | @ISA = 'PPI::Structure'; |
43 | } |
44 | |
45 | # Highly special custom isa method that will continue to respond |
46 | # positively to ->isa('PPI::Structure::ForLoop') but warns. |
47 | my $has_warned = 0; |
48 | sub isa { |
49 | if ( $_[1] and $_[1] eq 'PPI::Structure::ForLoop' ) { |
50 | unless ( $has_warned ) { |
51 | warn("PPI::Structure::ForLoop has been deprecated"); |
52 | $has_warned = 1; |
53 | } |
54 | return 1; |
55 | } |
56 | return shift->SUPER::isa(@_); |
57 | } |
58 | |
59 | 1; |
60 | |
61 | =pod |
62 | |
63 | =head1 SUPPORT |
64 | |
65 | See the L<support section|PPI/SUPPORT> in the main module. |
66 | |
67 | =head1 AUTHOR |
68 | |
69 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> |
70 | |
71 | =head1 COPYRIGHT |
72 | |
73 | Copyright 2001 - 2009 Adam Kennedy. |
74 | |
75 | This program is free software; you can redistribute |
76 | it and/or modify it under the same terms as Perl itself. |
77 | |
78 | The full text of the license can be found in the |
79 | LICENSE file included with this module. |
80 | |
81 | =cut |