Revert "Make the handle a template parameter"

master
Zaahir Moolla 2016-02-16 18:01:44 -05:00
parent 0c9d8fa424
commit cc3d54f455
2 changed files with 6 additions and 6 deletions

View File

@ -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'

View File

@ -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 => {