Created my first Goodie

master
purplehuman 2015-01-04 04:10:57 +00:00
parent fd9ffb7751
commit f4f1061abb
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,24 @@
package DDG::Goodie::IsAwesome::purplehuman;
# ABSTRACT: purplehuman's first Goodie
use DDG::Goodie;
zci answer_type => "is_awesome_purplehuman";
zci is_cached => 1;
name "IsAwesome purplehuman";
description "My first Goodie, it let's the world know that purplehuman is awesome";
primary_example_queries "duckduckhack purplehuman";
category "special";
topics "special_interest", "geek";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/purplehuman.pm";
attribution github => ["https://github.com/purplehuman", "purplehuman"];
triggers start => "duckduckhack purplehuman";
handle remainder => sub {
return if $_;
return "purplehuman is awesome!";
};
1;

19
t/IsAwesome/purplehuman.t Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "is_awesome_purplehuman";
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::IsAwesome::purplehuman
)],
'duckduckhack purplehuman' => test_zci('purplehuman is awesome!'),
'duckduckhack purplehuman is awesome' => undef,
);
done_testing;