Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / PPI / Structure / List.pm
1 package PPI::Structure::List;
2
3 =pod
4
5 =head1 NAME
6
7 PPI::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
26 C<PPI::Structure::List> is the class used for circular braces that
27 represent lists, and related.
28
29 =head1 METHODS
30
31 C<PPI::Structure::List> has no methods beyond those provided by the
32 standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods.
33
34 Got any ideas for methods? Submit a report to rt.cpan.org!
35
36 =cut
37
38 use strict;
39 use PPI::Structure ();
40
41 use vars qw{$VERSION @ISA};
42 BEGIN {
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.
49 my $has_warned = 0;
50 sub 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
67 1;
68
69 =pod
70
71 =head1 SUPPORT
72
73 See the L<support section|PPI/SUPPORT> in the main module.
74
75 =head1 AUTHOR
76
77 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
78
79 =head1 COPYRIGHT
80
81 Copyright 2001 - 2009 Adam Kennedy.
82
83 This program is free software; you can redistribute
84 it and/or modify it under the same terms as Perl itself.
85
86 The full text of the license can be found in the
87 LICENSE file included with this module.
88
89 =cut