| 1 | |||||||||||||||||||||||||||||||||||||||||||
| 2 | package VoiceXML::Client::Item::Break; | ||||||||||||||||||||||||||||||||||||||||||
| 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 | 3 | ▶ | use vars qw{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 45 | %StrengthToSeconds | ||||||||||||||||||||||||||||||||||||||||||
| 46 | 3 | }; | |||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | 3 | $VERSION = $VoiceXML::Client::Item::VERSION; | |||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||
| 52 | 3 | %StrengthToSeconds = ( | |||||||||||||||||||||||||||||||||||||||||
| 53 | 'none' => 0, | ||||||||||||||||||||||||||||||||||||||||||
| 54 | 'x-weak' => 0, | ||||||||||||||||||||||||||||||||||||||||||
| 55 | 'weak' => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 56 | 'medium'=> 1, | ||||||||||||||||||||||||||||||||||||||||||
| 57 | 'strong'=> 2, | ||||||||||||||||||||||||||||||||||||||||||
| 58 | 'x-strong' => 3, | ||||||||||||||||||||||||||||||||||||||||||
| 59 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||||
| 61 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | ▶ | sub init { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
init: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | ▶ | $self->{'strength'} = $self->{'XMLElement'}->attribute('strength') || 'medium'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->{'XMLElement'}->attribute('strength') || 'medium'
MC/DC0%0/1
$self->{'XMLElement'}->attribute('strength') || 'medium'
$self->{'XMLElement'}->attribute('strength')
Truth table0%0/2
A
A= $self->{'XMLElement'}->attribute('strength')
| |||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||
| 76 | 0 | ▶ | sub execute { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
execute: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 77 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | my $handle = shift; | |||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | my $optParams = shift; | |||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||
| 81 | 0 | ▶ | if ($self->{'strength'} && exists $StrengthToSeconds{$self->{'strength'}} && $StrengthToSeconds{$self->{'strength'}}) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$self->{"strength"} and exists $VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}} and $VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}}
$self->{"strength"} and exists $VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}}
MC/DC0%0/3
$self->{"strength"} and exists $VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}} and $VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}}
$self->{"strength"}
exists $VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}}
$VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}}
Truth table0%0/4
A and B and C
A= $self->{"strength"}B= exists $VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}}C= $VoiceXML::Client::Item::Break::StrengthToSeconds{$self->{"strength"}}
| |||||||||||||||||||||||||||||||||||||||||||
| 82 | { | ||||||||||||||||||||||||||||||||||||||||||
| 83 | 0 | $handle->wait($StrengthToSeconds{$self->{'strength'}}); | |||||||||||||||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | return $self->executeChildren($handle, $optParams); | |||||||||||||||||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||
| 89 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||