2013-10-24 10:47:13 -07:00
|
|
|
package DDG::Goodie::<: $ia_name :>;
|
2014-09-15 12:22:15 -07:00
|
|
|
# ABSTRACT: Write an abstract here
|
|
|
|
# Start at https://duck.co/duckduckhack/goodie_overview if you are new
|
2013-10-28 13:18:28 -07:00
|
|
|
# to instant answer development
|
|
|
|
|
2013-10-18 05:43:52 -07:00
|
|
|
use DDG::Goodie;
|
|
|
|
|
2014-09-16 05:45:55 -07:00
|
|
|
zci answer_type => "<: $lia_name :>";
|
|
|
|
zci is_cached => 1;
|
|
|
|
|
2013-10-18 05:43:52 -07:00
|
|
|
#Attribution
|
2013-10-28 13:18:28 -07:00
|
|
|
primary_example_queries "first example query", "second example query";
|
|
|
|
secondary_example_queries "optional -- demonstrate any additional triggers";
|
|
|
|
description "Succinct explanation of what this instant answer does";
|
2013-10-24 10:47:13 -07:00
|
|
|
name "<: $ia_name :>";
|
2013-10-18 05:43:52 -07:00
|
|
|
icon_url "";
|
|
|
|
source "";
|
2013-10-28 13:18:28 -07:00
|
|
|
code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/<: $ia_name :>.pm";
|
2013-10-18 05:43:52 -07:00
|
|
|
category "";
|
|
|
|
topics "";
|
|
|
|
attribution github => ["https://github.com/", ""],
|
|
|
|
twitter => ["https://twitter.com/", ""];
|
|
|
|
|
|
|
|
# Triggers
|
2013-10-28 13:18:28 -07:00
|
|
|
triggers any => "triggerWord", "trigger phrase";
|
2013-10-18 05:43:52 -07:00
|
|
|
|
|
|
|
# Handle statement
|
2013-10-24 10:22:00 -07:00
|
|
|
handle remainder => sub {
|
2013-10-28 13:18:28 -07:00
|
|
|
|
|
|
|
# optional - regex guard
|
|
|
|
# return unless qr/^\w+/;
|
|
|
|
|
|
|
|
return $_ if $_;
|
|
|
|
return;
|
2013-10-18 05:43:52 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
1;
|