| 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
Condition33%1/3
defined $namelist and length $namelist
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
| |||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||
| 79 | { | ||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | 1 | ▶ | VoiceXML::Client::Util::log_msg("Returning from subdialog") if ($VoiceXML::Client::Debug); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||
| 88 | 0 | return $VoiceXML::Client::Flow::Directive{'CONTINUE'}; | |||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||
| 98 | 3 | 1; | |||||||||||||||||||||||||||