zeroclickinfo-goodies/template/lib/DDG/Goodie/Example.pm

38 lines
962 B
Perl
Raw Normal View History

2013-10-24 10:47:13 -07:00
package DDG::Goodie::<: $ia_name :>;
# 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
use DDG::Goodie;
zci answer_type => "<: $lia_name :>";
zci is_cached => 1;
#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 :>";
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";
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";
# Handle statement
handle remainder => sub {
2013-10-28 13:18:28 -07:00
# optional - regex guard
# return unless qr/^\w+/;
return $_ if $_;
return;
};
1;