| 1 | package VoiceXML::Client::Item::Field; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use base qw (VoiceXML::Client::Item); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use VoiceXML::Client::Util; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 3 | ▶ | use VoiceXML::Client::Item::Prompt; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | Copyright (C) 2007,2008 by Pat Deegan. | ||||||||||||||||||||||||||||||||||||||||||
| 15 | All rights reserved | ||||||||||||||||||||||||||||||||||||||||||
| 16 | http://voicexml.psychogenic.com | ||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | This library is released under the terms of the GNU GPL version 3, making it available only for | ||||||||||||||||||||||||||||||||||||||||||
| 19 | free programs ("free" here being used in the sense of the GPL, see http://www.gnu.org for more details). | ||||||||||||||||||||||||||||||||||||||||||
| 20 | Anyone wishing to use this library within a proprietary or otherwise non-GPLed program MUST contact psychogenic.com to | ||||||||||||||||||||||||||||||||||||||||||
| 21 | acquire a distinct license for their application. This approach encourages the use of free software | ||||||||||||||||||||||||||||||||||||||||||
| 22 | while allowing for proprietary solutions that support further development. | ||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | This file is part of VoiceXML::Client. | ||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | VoiceXML::Client is free software: you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||||||||||
| 30 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||||||||||||
| 31 | the Free Software Foundation, either version 3 of the License, or | ||||||||||||||||||||||||||||||||||||||||||
| 32 | (at your option) any later version. | ||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | VoiceXML::Client is distributed in the hope that it will be useful, | ||||||||||||||||||||||||||||||||||||||||||
| 35 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||||||||||||||||||||||||||||||||||
| 36 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||||||||||||||||||||||||||||||||||||||
| 37 | GNU General Public License for more details. | ||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | You should have received a copy of the GNU General Public License | ||||||||||||||||||||||||||||||||||||||||||
| 40 | along with VoiceXML::Client. If not, see <http://www.gnu.org/licenses/>. | ||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | 3 | ▶ | use vars qw{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 49 | $VERSION | ||||||||||||||||||||||||||||||||||||||||||
| 50 | $DefaultNumDigits | ||||||||||||||||||||||||||||||||||||||||||
| 51 | 3 | }; | |||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||
| 53 | 3 | $VERSION = $VoiceXML::Client::Item::VERSION; | |||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||
| 55 | 3 | $DefaultNumDigits = 1; | |||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | 1 | ▶ | sub init { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
init: called CC=11 SCAR=30.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 61 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||
| 63 | 1 | ▶ | unless (defined $self->{'name'}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 64 | { | ||||||||||||||||||||||||||||||||||||||||||
| 65 | 1 | ▶ | $self->{'name'} = $self->{'XMLElement'}->attribute('name') || int(rand(999999)) . time(); | ||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->{'XMLElement'}->attribute('name') || int(rand 999999) . time
MC/DC0%0/2
$self->{'XMLElement'}->attribute('name') || int(rand 999999) . time
$self->{'XMLElement'}->attribute('name')
int(rand 999999) . time
Truth table33%1/3
A || B
A= $self->{'XMLElement'}->attribute('name')B= int(rand 999999) . time
| |||||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||
| 69 | 1 | ▶ | $self->{'type'} = $self->{'XMLElement'}->attribute('type') || 'digits'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->{'XMLElement'}->attribute('type') || 'digits'
MC/DC0%0/1
$self->{'XMLElement'}->attribute('type') || 'digits'
$self->{'XMLElement'}->attribute('type')
Truth table50%1/2
A
A= $self->{'XMLElement'}->attribute('type')
| |||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||
| 71 | 1 | ▶ | if ($self->{'type'} eq 'digits') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 72 | { | ||||||||||||||||||||||||||||||||||||||||||
| 73 | 1 | ▶ | $self->{'numdigits'} = $self->{'XMLElement'}->attribute('numdigits') || $DefaultNumDigits; | ||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->{'XMLElement'}->attribute('numdigits') || $VoiceXML::Client::Item::Field::DefaultNumDigits
MC/DC0%0/2
$self->{'XMLElement'}->attribute('numdigits') || $VoiceXML::Client::Item::Field::DefaultNumDigits
$self->{'XMLElement'}->attribute('numdigits')
$VoiceXML::Client::Item::Field::DefaultNumDigits
Truth table33%1/3
A || B
A= $self->{'XMLElement'}->attribute('numdigits')B= $VoiceXML::Client::Item::Field::DefaultNumDigits
| |||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | 1 | ▶ | if ($self->{'numdigits'} && $self->{'numdigits'} >= 1) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->{"numdigits"} and $self->{"numdigits"} >= 1
MC/DC0%0/2
$self->{"numdigits"} and $self->{"numdigits"} >= 1
$self->{"numdigits"}
$self->{"numdigits"} >= 1
Truth table33%1/3
A and B
A= $self->{"numdigits"}B= $self->{"numdigits"} >= 1
| |||||||||||||||||||||||||||||||||||||||||||
| 76 | { | ||||||||||||||||||||||||||||||||||||||||||
| 77 | 1 | $self->{'inputmode'} = $VoiceXML::Client::DeviceHandle::InputMode{'FIXEDDIGIT'}; | |||||||||||||||||||||||||||||||||||||||||
| 78 | 1 | ▶ | VoiceXML::Client::Util::log_msg("Setting input mode to FIXED ($self->{'numdigits'}) for field $self->{'name'}") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 79 | if ($VoiceXML::Client::Debug); | ||||||||||||||||||||||||||||||||||||||||||
| 80 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 81 | 0 | $self->{'inputmode'} = $VoiceXML::Client::DeviceHandle::InputMode{'MULTIDIGIT'}; | |||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | ▶ | VoiceXML::Client::Util::log_msg("Setting input mode to MULTIDIGIT for field $self->{'name'}") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 83 | if ($VoiceXML::Client::Debug); | ||||||||||||||||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||
| 86 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | $self->{'numdigits'} = ''; | |||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | $self->{'inputmode'} = $VoiceXML::Client::DeviceHandle::InputMode{'MULTIDIGIT'}; | |||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | ▶ | VoiceXML::Client::Util::log_msg("Defaulting to MULTIDIGIT mode for field $self->{'name'}") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 91 | if ($VoiceXML::Client::Debug); | ||||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||
| 95 | 1 | VoiceXML::Client::Item::Util->declareVariable($self, $self->{'name'}); | |||||||||||||||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||||||||||||||||
| 97 | 1 | $self->{'noinput'} = []; | |||||||||||||||||||||||||||||||||||||||||
| 98 | 1 | $self->{'nomatch'} = []; | |||||||||||||||||||||||||||||||||||||||||
| 99 | 1 | $self->{'timeswithoutinput'} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 100 | 1 | $self->{'timesnomatchinput'} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 101 | 1 | $self->{'lastinputstate'} = ''; | |||||||||||||||||||||||||||||||||||||||||
| 102 | 1 | $self->{'infilledelement'} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | 1 | $self->{'currentinputtimeout'} = $VoiceXML::Client::Item::Prompt::DefaultTimeoutSeconds; | |||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||
| 106 | 1 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | sub inputReceivedInterrupt { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
inputReceivedInterrupt: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | my $handle = shift; | |||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | my $input = shift; | |||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | $handle->deleteInputReceivedCallback('fieldinput_' . $self->{'name'}); | |||||||||||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | ▶ | if ($self->{'infilledelement'}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 119 | { | ||||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | $self->abortProcessing(0) ; | |||||||||||||||||||||||||||||||||||||||||
| 122 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | $self->abortProcessing(1) ; | |||||||||||||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | sub execute { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
execute: not called CC=21 SCAR=61.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | my $handle = shift; | |||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | my $optParams = shift; | |||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | $self->clearValue(); | |||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | $handle->registerInputReceivedCallback('fieldinput_' . $self->{'name'}, $self, 'inputReceivedInterrupt'); | |||||||||||||||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | $handle->inputMode($self->{'inputmode'}, $self->{'numdigits'}); | |||||||||||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | ▶ | for (my $i=0; $i < @{$self->{'children'}}; $i++) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 144 | { | ||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | ▶ | my $aChild = $self->{'children'}->[$i] || next; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->{'children'}[$i] || (next)
MC/DC0%0/1
$self->{'children'}[$i] || (next)
$self->{'children'}[$i]
Truth table0%0/2
A
A= $self->{'children'}[$i]
| |||||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | my $cType = $aChild->getType(); | |||||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | ▶ | if ($cType eq 'VoiceXML::Client::Item::NoInput') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 150 | { | ||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | push @{$self->{'noinput'}}, $aChild; | |||||||||||||||||||||||||||||||||||||||||
| 152 | } elsif ($cType eq 'VoiceXML::Client::Item::NoMatch') | ||||||||||||||||||||||||||||||||||||||||||
| 153 | { | ||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | push @{$self->{'nomatch'}}, $aChild; | |||||||||||||||||||||||||||||||||||||||||
| 156 | } | ||||||||||||||||||||||||||||||||||||||||||
| 157 | } | ||||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||||
| 160 | 0 | my $fillFound = 0; | |||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | while (my $curChild = $self->getCurrentChild()) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 162 | { | ||||||||||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||||||||||
| 164 | 0 | my $cType = $curChild->getType(); | |||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | ▶ | if ($cType eq 'VoiceXML::Client::Item::Filled') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 166 | { | ||||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | $self->{'infilledelement'} = 1; | |||||||||||||||||||||||||||||||||||||||||
| 168 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | $self->{'infilledelement'} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | ▶ | if ($self->haveUserInput($handle, $optParams)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 173 | { | ||||||||||||||||||||||||||||||||||||||||||
| 174 | # the user has barged in... fugget about it--this is a barge in... we don't want to do | ||||||||||||||||||||||||||||||||||||||||||
| 175 | # anything except deal with the filled element if present and collect any remaining input | ||||||||||||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | $self->abortProcessing(0); | |||||||||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | ▶ | VoiceXML::Client::Util::log_msg("Field -- detected user input...") if ($VoiceXML::Client::Debug > 1); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | ▶ | unless ($self->{'infilledelement'}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 185 | { | ||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | ▶ | VoiceXML::Client::Util::log_msg("skipping $cType item") if ($VoiceXML::Client::Debug > 1); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | $self->proceedToNextChild(); | |||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 189 | } | ||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | ▶ | VoiceXML::Client::Util::log_msg("Dealing with the <filled> item") if ($VoiceXML::Client::Debug > 1); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | ▶ | if ($curChild->can('timeoutSeconds')) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 195 | { | ||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | ▶ | $self->{'currentinputtimeout'} = | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$curChild->timeoutSeconds || $VoiceXML::Client::Item::Prompt::DefaultTimeoutSeconds
MC/DC0%0/2
$curChild->timeoutSeconds || $VoiceXML::Client::Item::Prompt::DefaultTimeoutSeconds
$curChild->timeoutSeconds
$VoiceXML::Client::Item::Prompt::DefaultTimeoutSeconds
Truth table0%0/3
A || B
A= $curChild->timeoutSecondsB= $VoiceXML::Client::Item::Prompt::DefaultTimeoutSeconds
| |||||||||||||||||||||||||||||||||||||||||||
| 197 | $curChild->timeoutSeconds() | ||||||||||||||||||||||||||||||||||||||||||
| 198 | || $VoiceXML::Client::Item::Prompt::DefaultTimeoutSeconds; | ||||||||||||||||||||||||||||||||||||||||||
| 199 | } | ||||||||||||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | ▶ | if ($self->{'infilledelement'}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 202 | { | ||||||||||||||||||||||||||||||||||||||||||
| 203 | # we are in a <filled> element... | ||||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | $fillFound = 1; | |||||||||||||||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | $self->abortProcessing(0); | |||||||||||||||||||||||||||||||||||||||||
| 207 | # we might just be done here... let's see | ||||||||||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||||||||||
| 209 | 0 | ▶ | unless ($self->getUserInput($handle, $optParams)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 210 | { | ||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | return $self->refetchUserInput($handle, $optParams); | |||||||||||||||||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||||||||||
| 214 | ▶ | } elsif ($cType eq 'VoiceXML::Client::Item::NoInput' || $cType eq 'VoiceXML::Client::Item::NoMatch') | |||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$cType eq "VoiceXML::Client::Item::NoInput" or $cType eq "VoiceXML::Client::Item::NoMatch"
MC/DC0%0/2
$cType eq "VoiceXML::Client::Item::NoInput" or $cType eq "VoiceXML::Client::Item::NoMatch"
$cType eq "VoiceXML::Client::Item::NoInput"
$cType eq "VoiceXML::Client::Item::NoMatch"
Truth table0%0/3
A or B
A= $cType eq "VoiceXML::Client::Item::NoInput"B= $cType eq "VoiceXML::Client::Item::NoMatch"
| |||||||||||||||||||||||||||||||||||||||||||
| 215 | { | ||||||||||||||||||||||||||||||||||||||||||
| 216 | # skip these... | ||||||||||||||||||||||||||||||||||||||||||
| 217 | 0 | $self->proceedToNextChild(); | |||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 219 | } | ||||||||||||||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||||||||||||||||
| 222 | 0 | my $rv = $curChild->execute($handle, $optParams) ; | |||||||||||||||||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | ▶ | return $rv if ($rv != $VoiceXML::Client::Flow::Directive{'CONTINUE'}); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||||||||||||||||
| 226 | 0 | $self->proceedToNextChild(); | |||||||||||||||||||||||||||||||||||||||||
| 227 | } | ||||||||||||||||||||||||||||||||||||||||||
| 228 | |||||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | ▶ | unless ($fillFound) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 230 | { | ||||||||||||||||||||||||||||||||||||||||||
| 231 | # no filled element... need some input | ||||||||||||||||||||||||||||||||||||||||||
| 232 | 0 | $self->abortProcessing(0); | |||||||||||||||||||||||||||||||||||||||||
| 233 | 0 | ▶ | unless ($self->getUserInput($handle, $optParams)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 234 | { | ||||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | return $self->refetchUserInput($handle, $optParams); | |||||||||||||||||||||||||||||||||||||||||
| 236 | } | ||||||||||||||||||||||||||||||||||||||||||
| 237 | } | ||||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||
| 239 | 0 | return $VoiceXML::Client::Flow::Directive{'CONTINUE'}; | |||||||||||||||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||||||||||||||||
| 241 | } | ||||||||||||||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||||||||||||||
| 243 | 0 | ▶ | sub reset { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
reset: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 244 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | my $vxmlDoc = $self->getParentVXMLDocument(); | |||||||||||||||||||||||||||||||||||||||||
| 246 | 0 | $vxmlDoc->clearGlobalVar($self->{'name'}); | |||||||||||||||||||||||||||||||||||||||||
| 247 | 0 | $self->SUPER::reset(); | |||||||||||||||||||||||||||||||||||||||||
| 248 | } | ||||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | ▶ | sub getBestNoInputItem { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getBestNoInputItem: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | my $handle = shift; | |||||||||||||||||||||||||||||||||||||||||
| 253 | 0 | my $optParams = shift; | |||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||||||||||||||||
| 256 | 0 | my $lastCountMatch = 0; | |||||||||||||||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||||||||||||||||
| 258 | 0 | my $noInputMatch = $self->{'noinput'}->[0]; | |||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | my $idx = 1; | |||||||||||||||||||||||||||||||||||||||||
| 260 | 0 | ▶ | while ($idx < scalar @{$self->{'noinput'}}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 261 | { | ||||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | my $niItem = $self->{'noinput'}->[$idx]; | |||||||||||||||||||||||||||||||||||||||||
| 263 | 0 | ▶ | if ($niItem | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$niItem and $niItem->{"count"} <= $self->{"timeswithoutinput"} and $niItem->{"count"} > $lastCountMatch
$niItem and $niItem->{"count"} <= $self->{"timeswithoutinput"}
MC/DC0%0/3
$niItem and $niItem->{"count"} <= $self->{"timeswithoutinput"} and $niItem->{"count"} > $lastCountMatch
$niItem
$niItem->{"count"} <= $self->{"timeswithoutinput"}
$niItem->{"count"} > $lastCountMatch
Truth table0%0/4
A and B and C
A= $niItemB= $niItem->{"count"} <= $self->{"timeswithoutinput"}C= $niItem->{"count"} > $lastCountMatch
| |||||||||||||||||||||||||||||||||||||||||||
| 264 | && $niItem->{'count'} <= $self->{'timeswithoutinput'} | ||||||||||||||||||||||||||||||||||||||||||
| 265 | && $niItem->{'count'} > $lastCountMatch) | ||||||||||||||||||||||||||||||||||||||||||
| 266 | { | ||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | $lastCountMatch = $niItem->{'count'}; | |||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | $noInputMatch = $niItem; | |||||||||||||||||||||||||||||||||||||||||
| 269 | } | ||||||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | $idx++; | |||||||||||||||||||||||||||||||||||||||||
| 272 | } | ||||||||||||||||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||||||||||||||||
| 274 | 0 | return $noInputMatch; | |||||||||||||||||||||||||||||||||||||||||
| 275 | } | ||||||||||||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | ▶ | sub getBestNoMatchItem { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getBestNoMatchItem: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 279 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | my $handle = shift; | |||||||||||||||||||||||||||||||||||||||||
| 281 | 0 | my $optParams = shift; | |||||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||||||||||||||||
| 284 | 0 | my $lastCountMatch = 0; | |||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||||
| 286 | 0 | my $nomatchMatch = $self->{'nomatch'}->[0]; | |||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | my $idx = 1; | |||||||||||||||||||||||||||||||||||||||||
| 288 | 0 | ▶ | while ($idx < scalar @{$self->{'nomatch'}}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 289 | { | ||||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | my $niItem = $self->{'nomatch'}->[$idx]; | |||||||||||||||||||||||||||||||||||||||||
| 291 | 0 | ▶ | if ($niItem | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$niItem and $niItem->{"count"} <= $self->{"timesnomatchinput"} and $niItem->{"count"} > $lastCountMatch
$niItem and $niItem->{"count"} <= $self->{"timesnomatchinput"}
MC/DC0%0/3
$niItem and $niItem->{"count"} <= $self->{"timesnomatchinput"} and $niItem->{"count"} > $lastCountMatch
$niItem
$niItem->{"count"} <= $self->{"timesnomatchinput"}
$niItem->{"count"} > $lastCountMatch
Truth table0%0/4
A and B and C
A= $niItemB= $niItem->{"count"} <= $self->{"timesnomatchinput"}C= $niItem->{"count"} > $lastCountMatch
| |||||||||||||||||||||||||||||||||||||||||||
| 292 | && $niItem->{'count'} <= $self->{'timesnomatchinput'} | ||||||||||||||||||||||||||||||||||||||||||
| 293 | && $niItem->{'count'} > $lastCountMatch) | ||||||||||||||||||||||||||||||||||||||||||
| 294 | { | ||||||||||||||||||||||||||||||||||||||||||
| 295 | 0 | $lastCountMatch = $niItem->{'count'}; | |||||||||||||||||||||||||||||||||||||||||
| 296 | 0 | $nomatchMatch = $niItem; | |||||||||||||||||||||||||||||||||||||||||
| 297 | } | ||||||||||||||||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||||||||||||||||
| 299 | 0 | $idx++; | |||||||||||||||||||||||||||||||||||||||||
| 300 | } | ||||||||||||||||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | return $nomatchMatch; | |||||||||||||||||||||||||||||||||||||||||
| 303 | } | ||||||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | ▶ | sub refetchUserInput { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
refetchUserInput: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | my $handle = shift; | |||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | my $optParams = shift; | |||||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||
| 312 | |||||||||||||||||||||||||||||||||||||||||||
| 313 | 0 | ▶ | if ($self->{'lastinputstate'} eq 'none') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 314 | { | ||||||||||||||||||||||||||||||||||||||||||
| 315 | 0 | ▶ | if (scalar @{$self->{'noinput'}}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 316 | { | ||||||||||||||||||||||||||||||||||||||||||
| 317 | 0 | my $noInputMatch = $self->getBestNoInputItem($handle, $optParams); | |||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||
| 319 | 0 | ▶ | if ($noInputMatch) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 320 | { | ||||||||||||||||||||||||||||||||||||||||||
| 321 | 0 | return $noInputMatch->execute($handle, $optParams); | |||||||||||||||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||||||||||||||||
| 323 | } | ||||||||||||||||||||||||||||||||||||||||||
| 324 | } elsif ($self->{'lastinputstate'} eq 'invalid') | ||||||||||||||||||||||||||||||||||||||||||
| 325 | { | ||||||||||||||||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||||||||||||||||
| 327 | 0 | $self->reset(); | |||||||||||||||||||||||||||||||||||||||||
| 328 | 0 | my $noMatchInputItem = $self->getBestNoMatchItem(); | |||||||||||||||||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | ▶ | if ($noMatchInputItem) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 331 | { | ||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | return $noMatchInputItem->execute($handle, $optParams); | |||||||||||||||||||||||||||||||||||||||||
| 333 | } | ||||||||||||||||||||||||||||||||||||||||||
| 334 | } | ||||||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | $self->{'parent'}->reset(); | |||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | return $self->{'parent'}->execute($handle, $optParams); | |||||||||||||||||||||||||||||||||||||||||
| 339 | } | ||||||||||||||||||||||||||||||||||||||||||
| 340 | |||||||||||||||||||||||||||||||||||||||||||
| 341 | 0 | ▶ | sub haveUserInput { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
haveUserInput: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 342 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | ▶ | my $handle = shift || return undef; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || (return undef)
MC/DC0%0/1
shift() || (return undef)
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | my $optParams = shift; | |||||||||||||||||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||||||||||||||||
| 346 | |||||||||||||||||||||||||||||||||||||||||||
| 347 | 0 | return $handle->pendingInputLength(); | |||||||||||||||||||||||||||||||||||||||||
| 348 | } | ||||||||||||||||||||||||||||||||||||||||||
| 349 | |||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||
| 351 | 0 | ▶ | sub getUserInput { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getUserInput: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 352 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | my $handle = shift; | |||||||||||||||||||||||||||||||||||||||||
| 354 | 0 | my $optParams = shift; | |||||||||||||||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||
| 358 | 0 | my $number = $handle->readnum(undef, $self->{'currentinputtimeout'}, 1, $self->{'numdigits'}); | |||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | ▶ | if ($VoiceXML::Client::Debug > 1) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 360 | { | ||||||||||||||||||||||||||||||||||||||||||
| 361 | 0 | ▶ | my $gotnum = (defined $number) ? $number : ''; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | VoiceXML::Client::Util::log_msg("Field::getUserInput got '$gotnum' from handle"); | |||||||||||||||||||||||||||||||||||||||||
| 363 | } | ||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||
| 365 | 0 | ▶ | if (defined $number && length($number)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $number and length $number
MC/DC0%0/2
defined $number and length $number
defined $number
length $number
Truth table0%0/3
A and B
A= defined $numberB= length $number
| |||||||||||||||||||||||||||||||||||||||||||
| 366 | { | ||||||||||||||||||||||||||||||||||||||||||
| 367 | # got some input... | ||||||||||||||||||||||||||||||||||||||||||
| 368 | 0 | $self->{'timeswithoutinput'} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||||||||||||
| 370 | 0 | ▶ | if (scalar @{$self->{'nomatch'}}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 371 | { | ||||||||||||||||||||||||||||||||||||||||||
| 372 | # we have some nomatch fields... better check if this input is valid | ||||||||||||||||||||||||||||||||||||||||||
| 373 | # according to our grammmars... | ||||||||||||||||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | my $parentForm = $self->getParentForm(); | |||||||||||||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | ▶ | if ($parentForm->inputValidAccordingToGrammar($number)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 378 | { | ||||||||||||||||||||||||||||||||||||||||||
| 379 | # huzzah! | ||||||||||||||||||||||||||||||||||||||||||
| 380 | 0 | $self->value($number); | |||||||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||||||
| 382 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 383 | } | ||||||||||||||||||||||||||||||||||||||||||
| 384 | |||||||||||||||||||||||||||||||||||||||||||
| 385 | # the input came in, but was invalid and we have nomatch set... | ||||||||||||||||||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||||||||||||||||||
| 387 | 0 | ▶ | VoiceXML::Client::Util::log_msg("Field user input considered invalid") if ($VoiceXML::Client::Debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | $self->{'lastinputstate'} = 'invalid'; | |||||||||||||||||||||||||||||||||||||||||
| 389 | 0 | $self->{'timesnomatchinput'}++; | |||||||||||||||||||||||||||||||||||||||||
| 390 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||||||||||||||||
| 392 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 393 | |||||||||||||||||||||||||||||||||||||||||||
| 394 | # no nomatches set... so no checking, just set the value | ||||||||||||||||||||||||||||||||||||||||||
| 395 | # whatever it may be... | ||||||||||||||||||||||||||||||||||||||||||
| 396 | |||||||||||||||||||||||||||||||||||||||||||
| 397 | 0 | $self->value($number); | |||||||||||||||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||||||||||||||||
| 399 | 0 | ▶ | VoiceXML::Client::Util::log_msg("Setting user input to '$number'") if ($VoiceXML::Client::Debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 400 | |||||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 402 | } | ||||||||||||||||||||||||||||||||||||||||||
| 403 | } | ||||||||||||||||||||||||||||||||||||||||||
| 404 | |||||||||||||||||||||||||||||||||||||||||||
| 405 | 0 | ▶ | VoiceXML::Client::Util::log_msg("Field: no user input received") if ($VoiceXML::Client::Debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 406 | |||||||||||||||||||||||||||||||||||||||||||
| 407 | 0 | $self->{'timeswithoutinput'}++; | |||||||||||||||||||||||||||||||||||||||||
| 408 | 0 | $self->{'lastinputstate'} = 'none'; | |||||||||||||||||||||||||||||||||||||||||
| 409 | |||||||||||||||||||||||||||||||||||||||||||
| 410 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 411 | } | ||||||||||||||||||||||||||||||||||||||||||
| 412 | |||||||||||||||||||||||||||||||||||||||||||
| 413 | 0 | ▶ | sub value { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
value: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 414 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 415 | 0 | my $setTo = shift; | |||||||||||||||||||||||||||||||||||||||||
| 416 | |||||||||||||||||||||||||||||||||||||||||||
| 417 | 0 | my $vxmlDoc = $self->getParentVXMLDocument(); | |||||||||||||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||||||||||||
| 419 | |||||||||||||||||||||||||||||||||||||||||||
| 420 | |||||||||||||||||||||||||||||||||||||||||||
| 421 | 0 | ▶ | if (defined $setTo) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 422 | { | ||||||||||||||||||||||||||||||||||||||||||
| 423 | |||||||||||||||||||||||||||||||||||||||||||
| 424 | 0 | $self->{'lastinputstate'} = 'valid'; | |||||||||||||||||||||||||||||||||||||||||
| 425 | |||||||||||||||||||||||||||||||||||||||||||
| 426 | 0 | ▶ | VoiceXML::Client::Util::log_msg("Field setting variable " . $self->{'name'} . " to $setTo") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 427 | if ($VoiceXML::Client::Debug); | ||||||||||||||||||||||||||||||||||||||||||
| 428 | |||||||||||||||||||||||||||||||||||||||||||
| 429 | 0 | $vxmlDoc->globalVar($self->{'name'}, $setTo); | |||||||||||||||||||||||||||||||||||||||||
| 430 | } | ||||||||||||||||||||||||||||||||||||||||||
| 431 | |||||||||||||||||||||||||||||||||||||||||||
| 432 | 0 | return $vxmlDoc->globalVar($self->{'name'}); | |||||||||||||||||||||||||||||||||||||||||
| 433 | } | ||||||||||||||||||||||||||||||||||||||||||
| 434 | |||||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | ▶ | sub clearValue { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
clearValue: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 436 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 437 | |||||||||||||||||||||||||||||||||||||||||||
| 438 | 0 | VoiceXML::Client::Item::Util->resetVariable($self, $self->{'name'}); | |||||||||||||||||||||||||||||||||||||||||
| 439 | |||||||||||||||||||||||||||||||||||||||||||
| 440 | } | ||||||||||||||||||||||||||||||||||||||||||
| 441 | |||||||||||||||||||||||||||||||||||||||||||
| 442 | |||||||||||||||||||||||||||||||||||||||||||
| 443 | |||||||||||||||||||||||||||||||||||||||||||
| 444 | |||||||||||||||||||||||||||||||||||||||||||
| 445 | |||||||||||||||||||||||||||||||||||||||||||
| 446 | |||||||||||||||||||||||||||||||||||||||||||
| 447 | |||||||||||||||||||||||||||||||||||||||||||
| 448 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||