Created my first Goodie

master
chercolvin 2015-02-16 17:08:32 +00:00
parent 65ce14ec05
commit 61340d8c55
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,30 @@
package DDG::Goodie::IsAwesome::chercolvin;
# ABSTRACT: chercolvin's first goodie
use DDG::Goodie;
zci answer_type => "is_awesome_chercolvin";
zci is_cached => 1;
# Metadata
name "IsAwesome chercolvin";
description "My first Goodie, it lets the world know that chercolvin is awesome";
primary_example_queries "duckduckhack chercolvin";
category "special";
topics "special_interest", "geek";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/chercolvin.pm";
attribution github => ["chercolvin", "Cheryl Colvin"],
twitter => "chercolvin";
# Triggers
triggers start => "duckduckhack chercolvin";
# Handle statement
handle remainder => sub {
return if $_;
return "chercolvin is awesome and has successfully completed the DuckDuckHack Goodie tutorial!";
};
1;

17
t/IsAwesome/chercolvin.t Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "is_awesome_chercolvin";
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::IsAwesome::chercolvin )],
'duckduckhack chercolvin' => test_zci('chercolvin is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'),
'duckduckhack chercolvin is awesome' => undef,
);
done_testing;