Revert "Make the handle a template parameter"
parent
0c9d8fa424
commit
cc3d54f455
|
@ -14,12 +14,12 @@ zci answer_type => '<: $ia_id :>';
|
|||
zci is_cached => 1;
|
||||
|
||||
# Triggers - http://docs.duckduckhack.com/walkthroughs/calculation.html#triggers
|
||||
triggers <: $ia_trigger :>;
|
||||
triggers any => 'triggerword', 'trigger phrase';
|
||||
|
||||
# Handle statement
|
||||
handle <: $ia_handler :> => sub {
|
||||
handle remainder => sub {
|
||||
|
||||
my <: $ia_handler_var :><: $ia_handler :> = <: $ia_handler_var :>_;
|
||||
my $remainder = $_;
|
||||
|
||||
# Optional - Guard against no remainder
|
||||
# I.E. the query is only 'triggerWord' or 'trigger phrase'
|
||||
|
|
|
@ -13,10 +13,10 @@ zci answer_type => '<: $ia_id :>';
|
|||
zci is_cached => 1;
|
||||
|
||||
# Triggers - https://duck.co/duckduckhack/goodie_triggers
|
||||
triggers <: $ia_trigger :>;
|
||||
triggers any => 'triggerword', 'trigger phrase';
|
||||
|
||||
# Handle statement
|
||||
handle <: $ia_handler :> => sub {
|
||||
handle remainder => sub {
|
||||
|
||||
return "plain text response",
|
||||
structured_answer => {
|
||||
|
@ -31,7 +31,7 @@ handle <: $ia_handler :> => sub {
|
|||
name => 'Answer',
|
||||
|
||||
data => {
|
||||
<: $ia_handler :> => \<: $ia_handler_var :>_
|
||||
remainder => $_
|
||||
},
|
||||
|
||||
templates => {
|
||||
|
|
Loading…
Reference in New Issue