1PPI::Statement::When(3)User Contributed Perl DocumentatioPnPI::Statement::When(3)
2
3
4
6 PPI::Statement::When - Describes all compound statements
7
9 foreach ( qw/ foo bar baz / ) {
10 when ( m/b/ ) {
11 boing($_);
12 }
13 when ( m/f/ ) {
14 boom($_);
15 }
16 default {
17 tchak($_);
18 }
19 }
20
22 PPI::Statement::When
23 isa PPI::Statement
24 isa PPI::Node
25 isa PPI::Element
26
28 "PPI::Statement::When" objects are used to describe when and default
29 statements, as described in perlsyn.
30
32 "PPI::Structure::When" has no methods beyond those provided by the
33 standard PPI::Structure, PPI::Node and PPI::Element methods.
34
35 Got any ideas for methods? Submit a report to rt.cpan.org!
36
38 - Write unit tests for this package
39
41 See the support section in the main module.
42
44 Adam Kennedy <adamk@cpan.org>
45
47 Copyright 2001 - 2011 Adam Kennedy.
48
49 This program is free software; you can redistribute it and/or modify it
50 under the same terms as Perl itself.
51
52 The full text of the license can be found in the LICENSE file included
53 with this module.
54
55
56
57perl v5.16.3 2011-02-26 PPI::Statement::When(3)