Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / PPI / Statement / When.pm
1 package PPI::Statement::When;
2
3 =pod
4
5 =head1 NAME
6
7 PPI::Statement::When - Describes all compound statements
8
9 =head1 SYNOPSIS
10
11   foreach ( qw/ foo bar baz / ) {
12       when ( m/b/ ) {
13           boing($_);
14       }
15       when ( m/f/ ) {
16           boom($_);
17       }
18       default {
19           tchak($_);
20       }
21   }
22
23 =head1 INHERITANCE
24
25   PPI::Statement::When
26   isa PPI::Statement
27       isa PPI::Node
28           isa PPI::Element
29
30 =head1 DESCRIPTION
31
32 C<PPI::Statement::When> objects are used to describe when and default
33 statements, as described in L<perlsyn>.
34
35 =head1 METHODS
36
37 C<PPI::Structure::When> has no methods beyond those provided by the
38 standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods.
39
40 Got any ideas for methods? Submit a report to rt.cpan.org!
41
42 =cut
43
44 use strict;
45 use PPI::Statement ();
46
47 use vars qw{$VERSION @ISA};
48 BEGIN {
49         $VERSION = '1.206';
50         @ISA     = 'PPI::Statement';
51 }
52
53 # Lexer clues
54 sub __LEXER__normal { '' }
55
56 sub _complete {
57         my $child = $_[0]->schild(-1);
58         return !! (
59                 defined $child
60                 and
61                 $child->isa('PPI::Structure::Block')
62                 and
63                 $child->complete
64         );
65 }
66
67
68
69
70
71 #####################################################################
72 # PPI::Node Methods
73
74 sub scope {
75         1;
76 }
77
78 1;
79
80 =pod
81
82 =head1 TO DO
83
84 - Write unit tests for this package
85
86 =head1 SUPPORT
87
88 See the L<support section|PPI/SUPPORT> in the main module.
89
90 =head1 AUTHOR
91
92 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
93
94 =head1 COPYRIGHT
95
96 Copyright 2001 - 2009 Adam Kennedy.
97
98 This program is free software; you can redistribute
99 it and/or modify it under the same terms as Perl itself.
100
101 The full text of the license can be found in the
102 LICENSE file included with this module.
103
104 =cut