line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tropo::WebAPI::Ask; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: "Ask" something with Tropo |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
632
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
6
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
296
|
use Types::Standard qw(Num Int Str Bool ArrayRef Dict); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
10
|
1
|
|
|
1
|
|
1130
|
use Type::Tiny; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
269
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'Tropo::WebAPI::Base'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Tropo::WebAPI::Base::register(); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = 0.01; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has text => (is => 'ro', isa => Str, required => 1); |
19
|
|
|
|
|
|
|
has attempts => (is => 'ro', isa => Int); |
20
|
|
|
|
|
|
|
has timeout => (is => 'ro', isa => Int); |
21
|
|
|
|
|
|
|
has choices => (is => 'ro', isa => Str); |
22
|
|
|
|
|
|
|
has voice => (is => 'ro', isa => Str); |
23
|
|
|
|
|
|
|
has allow_signals => (is => 'ro', isa => ArrayRef[]); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub BUILDARGS { |
26
|
0
|
|
|
0
|
0
|
|
my ( $class, @args ) = @_; |
27
|
|
|
|
|
|
|
|
28
|
0
|
0
|
|
|
|
|
unshift @args, "text" if @args % 2; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return { @args }; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |