logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PPI::Statement::When - A when statement

Author

       Adam Kennedy <adamk@cpan.org>

Description

       "PPI::Statement::When" objects are used to describe when and default statements, as described in perlsyn.

Inheritance

         PPI::Statement::When
         isa PPI::Statement
             isa PPI::Node
                 isa PPI::Element

Methods

       "PPI::Structure::When" has no methods beyond those provided by the standard PPI::Structure, PPI::Node and
       PPI::Element methods.

Name

       PPI::Statement::When - A when statement

Support

       See the support section in the main module.

Synopsis

         foreach ( qw/ foo bar baz / ) {
             when ( m/b/ ) {
                 boing($_);
             }
             when ( m/f/ ) {
                 boom($_);
             }
             default {
                 tchak($_);
             }
         }

To Do

       - Write unit tests for this package

See Also