Client/Item/Return.pm

filter: Statementstmt 93.5% 29 / 31 Branchbran 37.5% 3 / 8 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod 50.0% 1 / 2 totaltotal 77.3% 41 / 53 CC 6 SCAR 10.7
CC
6
Cov
79%
execute
5.0
init
3.2
BEGIN
1.0
CRAP 2.9
« Client/Item/Filled.pm ↑ Summary Client/Device/Dummy.pm »
1  
2 package VoiceXML::Client::Item::Return;
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 3 ▶use VoiceXML::Client::Item::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9  
10 =head1 COPYRIGHT AND LICENSE
11  
12
13 Copyright (C) 2007,2008 by Pat Deegan.
14 All rights reserved
15 http://voicexml.psychogenic.com
16  
17 This library is released under the terms of the GNU GPL version 3, making it available only for
18 free programs ("free" here being used in the sense of the GPL, see http://www.gnu.org for more details).
19 Anyone wishing to use this library within a proprietary or otherwise non-GPLed program MUST contact psychogenic.com to
20 acquire a distinct license for their application. This approach encourages the use of free software
21 while allowing for proprietary solutions that support further development.
22  
23  
24 This file is part of VoiceXML::Client.
25  
26
27
28 VoiceXML::Client is free software: you can redistribute it and/or modify
29 it under the terms of the GNU General Public License as published by
30 the Free Software Foundation, either version 3 of the License, or
31 (at your option) any later version.
32  
33 VoiceXML::Client is distributed in the hope that it will be useful,
34 but WITHOUT ANY WARRANTY; without even the implied warranty of
35 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 GNU General Public License for more details.
37  
38 You should have received a copy of the GNU General Public License
39 along with VoiceXML::Client. If not, see <http://www.gnu.org/licenses/>.
40  
41  
42 =cut
43  
44  
45  
46 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
47  
48 3 ▶use vars qw{
Subroutine BEGIN: called CC=1 SCAR=0.0
49 $VERSION
50 3 };
51  
52 3 $VERSION = '1.02';
53  
54  
55  
56 1 ▶sub init {
Subroutine init: called CC=3 SCAR=11.8
Pod documented
57 1 my $self = shift;
58
59 1 my $namelist = $self->{'XMLElement'}->attribute('namelist');
60
61 1 ▶ if (defined $namelist && length($namelist))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $namelist and length $namelist) 1 0 1
Condition33%1/3
defined $namelist and length $namelist
!ll&&!rl&&r
001
MC/DC0%0/2
defined $namelist and length $namelist
defined $namelist length $namelist
Truth table33%1/3
A and B
A= defined $namelistB= length $namelist
ABresult
0X0
100
111
62 {
63 1 $self->{'namelist'} = $namelist;
64 }
65
66 1 return 1;
67
68
69 }
70  
71 1 ▶sub execute {
Subroutine execute: called CC=4 SCAR=16.1
Pod undocumented
72 1 my $self = shift;
73 1 my $handle = shift;
74 1 my $optParams = shift;
75
76 1 my $parentForm = $self->getParentForm();
77
78 1 ▶ if ($parentForm->calledAsSub())
Branch: 1 branch
BranchTrueFalseTotal
if ($parentForm->calledAsSub) 1 0 1
79 {
80
81
82 1 ▶ VoiceXML::Client::Util::log_msg("Returning from subdialog") if ($VoiceXML::Client::Debug);
Branch: 1 branch
BranchTrueFalseTotal
if $VoiceXML::Client::Debug 0 1 1
83
84 1 return $VoiceXML::Client::Flow::Directive{'SUBRETURN'};
85 }
86
87 0 ▶ VoiceXML::Client::Util::log_msg("Return hit but not in subdialog call") if ($VoiceXML::Client::Debug);
Branch: 1 branch
BranchTrueFalseTotal
if $VoiceXML::Client::Debug 0 0 0
88 0 return $VoiceXML::Client::Flow::Directive{'CONTINUE'};
89
90
91 }
92  
93  
94
95  
96  
97  
98 3 1;
« Client/Item/Filled.pm ↑ Summary Client/Device/Dummy.pm »