From 0b0c8cece2cce254c10f8057138153f4255d6be1 Mon Sep 17 00:00:00 2001 From: murz Date: Sat, 14 Feb 2015 00:15:19 +0000 Subject: [PATCH] Created my IsAwesome Goodie... --- lib/DDG/Goodie/IsAwesome/murz.pm | 29 +++++++++++++++++++++++++++++ t/IsAwesome/murz.t | 19 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/murz.pm create mode 100644 t/IsAwesome/murz.t diff --git a/lib/DDG/Goodie/IsAwesome/murz.pm b/lib/DDG/Goodie/IsAwesome/murz.pm new file mode 100644 index 000000000..b40bc6552 --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/murz.pm @@ -0,0 +1,29 @@ +package DDG::Goodie::IsAwesome::murz; +# ABSTRACT: Write an abstract here +# Start at https://duck.co/duckduckhack/goodie_overview if you are new +# to instant answer development + +use DDG::Goodie; + +zci answer_type => "is_awesome_murz"; +zci is_cached => 1; + +# Metadata. See https://duck.co/duckduckhack/metadata for help in filling out this section. +name "IsAwesome murz"; +description "My first Goodie, it lets the world know that murz is awesome"; +primary_example_queries "duckduckhack murz"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/murz.pm"; +attribution github => ["GitHubAccount", "murz"]; + +# Triggers +triggers start => "duckduckhack murz"; + +# Handle statement +handle remainder => sub { + return if $_; + return "murz is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/murz.t b/t/IsAwesome/murz.t new file mode 100644 index 000000000..497a7ce67 --- /dev/null +++ b/t/IsAwesome/murz.t @@ -0,0 +1,19 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; +use DDG::Test::Goodie; + +zci answer_type => "is_awesome_murz"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::murz + )], + 'duckduckhack murz' => test_zci('murz is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack murz is awesome' => undef, +); + +done_testing;