1package PPI::Statement::Given; 2 3=pod 4 5=head1 NAME 6 7PPI::Statement::Given - A given-when statement 8 9=head1 SYNOPSIS 10 11 given ( foo ) { 12 say $_; 13 } 14 15=head1 INHERITANCE 16 17 PPI::Statement::Given 18 isa PPI::Statement 19 isa PPI::Node 20 isa PPI::Element 21 22=head1 DESCRIPTION 23 24C<PPI::Statement::Given> objects are used to describe switch statements, as 25described in L<perlsyn>. 26 27=head1 METHODS 28 29C<PPI::Statement::Given> has no methods beyond those provided by the 30standard L<PPI::Structure>, L<PPI::Node> and L<PPI::Element> methods. 31 32=cut 33 34use strict; 35use PPI::Statement (); 36 37our $VERSION = '1.270'; # VERSION 38 39our @ISA = "PPI::Statement"; 40 41# Lexer clues 42sub __LEXER__normal() { '' } 43 44sub _complete { 45 my $child = $_[0]->schild(-1); 46 return !! ( 47 defined $child 48 and 49 $child->isa('PPI::Structure::Block') 50 and 51 $child->complete 52 ); 53} 54 55 56 57 58 59##################################################################### 60# PPI::Node Methods 61 62sub scope() { 1 } 63 641; 65 66=pod 67 68=head1 TO DO 69 70- Write unit tests for this package 71 72=head1 SUPPORT 73 74See the L<support section|PPI/SUPPORT> in the main module. 75 76=head1 AUTHOR 77 78Adam Kennedy E<lt>adamk@cpan.orgE<gt> 79 80=head1 COPYRIGHT 81 82Copyright 2001 - 2011 Adam Kennedy. 83 84This program is free software; you can redistribute 85it and/or modify it under the same terms as Perl itself. 86 87The full text of the license can be found in the 88LICENSE file included with this module. 89 90=cut 91