Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / PPI / Structure / List.pm
CommitLineData
3fea05b9 1package PPI::Structure::List;
2
3=pod
4
5=head1 NAME
6
7PPI::Structure::List - Explicit list or precedence ordering braces
8
9=head1 SYNOPSIS
10
11 # A list used for params
12 function( 'param', 'param' );
13
14 # Explicit list
15 return ( 'foo', 'bar' );
16
17=head1 INHERITANCE
18
19 PPI::Structure::List
20 isa PPI::Structure
21 isa PPI::Node
22 isa PPI::Element
23
24=head1 DESCRIPTION
25
26C<PPI::Structure::List> is the class used for circular braces that
27represent lists, and related.
28
29=head1 METHODS
30
31C<PPI::Structure::List> has no methods beyond those provided by the
32standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods.
33
34Got any ideas for methods? Submit a report to rt.cpan.org!
35
36=cut
37
38use strict;
39use PPI::Structure ();
40
41use vars qw{$VERSION @ISA};
42BEGIN {
43 $VERSION = '1.206';
44 @ISA = 'PPI::Structure';
45}
46
47# Highly special custom isa method that will continue to respond
48# positively to ->isa('PPI::Structure::ForLoop') but warns.
49my $has_warned = 0;
50sub isa {
51 if ( $_[1] and $_[1] eq 'PPI::Structure::ForLoop' ) {
52 if (
53 $_[0]->parent->isa('PPI::Statement::Compound')
54 and
55 $_[0]->type =~ /^for/
56 ) {
57 unless ( $has_warned ) {
58 warn("PPI::Structure::ForLoop has been deprecated");
59 $has_warned = 1;
60 }
61 return 1;
62 }
63 }
64 return shift->SUPER::isa(@_);
65}
66
671;
68
69=pod
70
71=head1 SUPPORT
72
73See the L<support section|PPI/SUPPORT> in the main module.
74
75=head1 AUTHOR
76
77Adam Kennedy E<lt>adamk@cpan.orgE<gt>
78
79=head1 COPYRIGHT
80
81Copyright 2001 - 2009 Adam Kennedy.
82
83This program is free software; you can redistribute
84it and/or modify it under the same terms as Perl itself.
85
86The full text of the license can be found in the
87LICENSE file included with this module.
88
89=cut