Make the handle a template parameter

master
Zach Thompson 2016-01-20 14:02:08 -07:00
parent 53b53d9495
commit b1f367cc81
2 changed files with 4 additions and 4 deletions

View File

@ -17,9 +17,9 @@ zci is_cached => 1;
triggers any => 'triggerword', 'trigger phrase';
# Handle statement
handle remainder => sub {
handle <: $ia_handler :> => sub {
my $remainder = $_;
my <: $ia_handler_var :><: $ia_handler :> = <: $ia_handler_var :>_;
# Optional - Guard against no remainder
# I.E. the query is only 'triggerWord' or 'trigger phrase'

View File

@ -16,7 +16,7 @@ zci is_cached => 1;
triggers any => 'triggerword', 'trigger phrase';
# Handle statement
handle remainder => sub {
handle <: $ia_handler :> => sub {
return "plain text response",
structured_answer => {
@ -31,7 +31,7 @@ handle remainder => sub {
name => 'Answer',
data => {
remainder => $_
<: $ia_handler :> => \<: $ia_handler_var :>_
},
templates => {