Client/Item/NoInput.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 50.0% 1 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 93.5% 29 / 31 CC 3 SCAR 6.4
CC
3
Cov
92%
init
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« Client.pm ↑ Summary Client/Item/Var.pm »
1  
2 package VoiceXML::Client::Item::NoInput;
3  
4  
5 3 ▶use base qw (VoiceXML::Client::Item);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use VoiceXML::Client::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 =head1 COPYRIGHT AND LICENSE
10  
11
12 Copyright (C) 2007,2008 by Pat Deegan.
13 All rights reserved
14 http://voicexml.psychogenic.com
15  
16 This library is released under the terms of the GNU GPL version 3, making it available only for
17 free programs ("free" here being used in the sense of the GPL, see http://www.gnu.org for more details).
18 Anyone wishing to use this library within a proprietary or otherwise non-GPLed program MUST contact psychogenic.com to
19 acquire a distinct license for their application. This approach encourages the use of free software
20 while allowing for proprietary solutions that support further development.
21  
22  
23 This file is part of VoiceXML::Client.
24  
25
26
27 VoiceXML::Client is free software: you can redistribute it and/or modify
28 it under the terms of the GNU General Public License as published by
29 the Free Software Foundation, either version 3 of the License, or
30 (at your option) any later version.
31  
32 VoiceXML::Client is distributed in the hope that it will be useful,
33 but WITHOUT ANY WARRANTY; without even the implied warranty of
34 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 GNU General Public License for more details.
36  
37 You should have received a copy of the GNU General Public License
38 along with VoiceXML::Client. If not, see <http://www.gnu.org/licenses/>.
39  
40  
41 =cut
42  
43  
44  
45  
46 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
47  
48  
49 3 ▶use vars qw{
Subroutine BEGIN: called CC=1 SCAR=0.0
50 $VERSION
51 3 };
52  
53 3 $VERSION = $VoiceXML::Client::Item::VERSION;
54  
55  
56  
57  
58  
59 2 ▶sub init {
Subroutine init: called CC=3 SCAR=11.2
Pod documented
60 2 my $self = shift;
61
62 2 ▶ my $count = $self->{'XMLElement'}->attribute('count') || 0;
Condition100%2/2
$self->{'XMLElement'}->attribute('count') || 0
l!l
11
MC/DC100%1/1
$self->{'XMLElement'}->attribute('count') || 0
$self->{'XMLElement'}->attribute('count')
Truth table100%2/2
A
A= $self->{'XMLElement'}->attribute('count')
Aresult
11
00
63
64 2 ▶ if ($count =~ m/^\d+$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($count =~ /^\d+$/) { } 2 0 2
65 {
66 2 $self->{'count'} = $count;
67 } else {
68 0 $self->{'count'} = 0;
69 }
70
71 2 return 1;
72  
73 }
74
75  
76  
77  
78 3 1;
« Client.pm ↑ Summary Client/Item/Var.pm »