File Coverage

blib/lib/PPI/Statement/Given.pm
Criterion Covered Total %
statement 6 8 75.0
branch n/a
condition 0 3 0.0
subroutine 2 3 66.6
pod n/a
total 8 14 57.1


line stmt bran cond sub pod time code
1             package PPI::Statement::Given;
2              
3             =pod
4              
5             =head1 NAME
6              
7             PPI::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              
24             C objects are used to describe switch statements, as
25             described in L.
26              
27             =head1 METHODS
28              
29             C has no methods beyond those provided by the
30             standard L, L and L methods.
31              
32             =cut
33              
34 64     64   421 use strict;
  64         202  
  64         1502  
35 64     64   386 use PPI::Statement ();
  64         117  
  64         7542  
36              
37             our $VERSION = '1.276';
38              
39             our @ISA = "PPI::Statement";
40              
41             # Lexer clues
42             sub __LEXER__normal() { '' }
43              
44             sub _complete {
45 0     0     my $child = $_[0]->schild(-1);
46             return !! (
47 0   0       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              
62             sub scope() { 1 }
63              
64             1;
65              
66             =pod
67              
68             =head1 TO DO
69              
70             - Write unit tests for this package
71              
72             =head1 SUPPORT
73              
74             See the L in the main module.
75              
76             =head1 AUTHOR
77              
78             Adam Kennedy Eadamk@cpan.orgE
79              
80             =head1 COPYRIGHT
81              
82             Copyright 2001 - 2011 Adam Kennedy.
83              
84             This program is free software; you can redistribute
85             it and/or modify it under the same terms as Perl itself.
86              
87             The full text of the license can be found in the
88             LICENSE file included with this module.
89              
90             =cut